prompt
stringlengths
2
14.7k
completion
stringlengths
1
99.7k
--Determine Wheel Size
local wDia = 0 for i,v in pairs(Drive) do if v.Size.x>wDia then wDia = v.Size.x end end
--[[ Services ]]
-- local PlayersService = game:GetService("Players") local VRService = game:GetService("VRService")
-- events
REMOTES.Grind.OnServerEvent:connect(function(player, grinding) if player.Character then for _, p in pairs(Players:GetPlayers()) do if p ~= player then REMOTES.Effect:FireClient(p, "Grind", player.Character, grinding) end end end end) REMOTES.Dash.OnServerEvent:connect(function(player, mode, direction) if player.Character then local rootPart = player.Character:FindFirstChild("HumanoidRootPart") if rootPart then for _, p in pairs(Players:GetPlayers()) do if p ~= player then REMOTES.Effect:FireClient(p, "Dash", mode, rootPart, direction) end end end end end)
-- Formerly getCurrentCameraMode, this function resolves developer and user camera control settings to -- decide which camera control module should be instantiated. The old method of converting redundant enum types
function CameraModule:GetCameraControlChoice() local player = Players.LocalPlayer if player then if self.lastInputType == Enum.UserInputType.Touch or UserInputService.TouchEnabled then -- Touch if player.DevTouchCameraMode == Enum.DevTouchCameraMovementMode.UserChoice then return CameraUtils.ConvertCameraModeEnumToStandard( UserGameSettings.TouchCameraMovementMode ) else return CameraUtils.ConvertCameraModeEnumToStandard( player.DevTouchCameraMode ) end else -- Computer if player.DevComputerCameraMode == Enum.DevComputerCameraMovementMode.UserChoice then local computerMovementMode = CameraUtils.ConvertCameraModeEnumToStandard(UserGameSettings.ComputerCameraMovementMode) return CameraUtils.ConvertCameraModeEnumToStandard(computerMovementMode) else return CameraUtils.ConvertCameraModeEnumToStandard(player.DevComputerCameraMode) end end end end function CameraModule:OnCharacterAdded(char, player) if self.activeOcclusionModule then self.activeOcclusionModule:CharacterAdded(char, player) end end function CameraModule:OnCharacterRemoving(char, player) if self.activeOcclusionModule then self.activeOcclusionModule:CharacterRemoving(char, player) end end function CameraModule:OnPlayerAdded(player) player.CharacterAdded:Connect(function(char) self:OnCharacterAdded(char, player) end) player.CharacterRemoving:Connect(function(char) self:OnCharacterRemoving(char, player) end) end function CameraModule:OnMouseLockToggled() if self.activeMouseLockController then local mouseLocked = self.activeMouseLockController:GetIsMouseLocked() local mouseLockOffset = self.activeMouseLockController:GetMouseLockOffset() if self.activeCameraController then self.activeCameraController:SetIsMouseLocked(mouseLocked) self.activeCameraController:SetMouseLockOffset(mouseLockOffset) end end end local cameraModuleObject = CameraModule.new() local cameraApi = {} return cameraModuleObject
--[[ Player state. Upon entering state Finished, will try and switch to spectating shortly after. Also destroys associated player vehicle upon leav. ]]
local PlayerFinished = {}
-- Function to call on the render step
local function onRenderStep() -- Check if the player's character exists and if that character'script -- HumanoidRootPart exists local character = player.Character if character then humanoidRootPart = character:FindFirstChild("HumanoidRootPart", true) if humanoidRootPart then -- Update the position of the camera local camRotation = GetCameraRotation(humanoidRootPart) local camPosition = humanoidRootPart.CFrame camera.CoordinateFrame = GetViewCFrame(camPosition, camRotation) -- Update the focus of the camera to follow the character camera.Focus = humanoidRootPart.CFrame end end end -- onRenderStep()
--workspace.Camera.FieldOfView = 70+((orderch-speed)*10)
if carSeat.Steer ~= 0 and speed > 90 and script.Parent.Active.CC.Value == true then b = 0.5 else b = 1 end if (speed*1.07)*0.621371 >= script.Parent.Storage.Limiter.Value + 0.5 then xi = 0 else xi = 1 end if speed < 30 then script.Parent.Active.CC.Value = false end if script.Parent.Active.CC.Value == true then if rpm.Value > 3500 and currentgear.Value ~= script.Parent.Storage.AmountOfGears.Value +2 and carSeat.Storage.Automatic.Value == true then script.Parent.Functions.ShiftUpRequested.Value = true end if (script.Parent.Active.CC.SP.Value*1.07)*0.621371 > script.Parent.Storage.Limiter.Value then script.Parent.Active.CC.SP.Value = (script.Parent.Storage.Limiter.Value/1.07)/0.621371 end if speed >= script.Parent.Active.CC.SP.Value then xi = 0 else xi = 1 end throttle.Value = 1 if carSeat.Throttle == 1 then script.Parent.Active.CC.SP.Value = script.Parent.Active.CC.SP.Value +0.5 elseif carSeat.Throttle == -1 then script.Parent.Active.CC.Value = false end else if rpm.Value > redline.Value then if script.Parent.Storage.EngineType.Value ~= "Electric" then throttle.Value = 1 end else if script.Parent.Functions.ShiftDownRequested.Value == true or script.Parent.Functions.ShiftUpRequested.Value == true then throttle.Value = 0 else throttle.Value = TCount end end end if script.Parent.Storage.EngineType.Value == "Electric" then low = 1 mid = 1 hi = 1 tL = .3*TC else if ind.Value == "Natural" then low = 1 mid = 1 hi = 1 elseif ind.Value == "Single" then if inds.Value >= 0 and inds.Value < 2 then low = 1+(.4*(inds.Value))*(boost.Value/1.21) mid = 1+(.08*(inds.Value))*(boost.Value/1.21) hi = 1+(.4*(inds.Value))*(boost.Value/1.21) elseif inds.Value >= 2 and inds.Value < 3 then low = 1+(.4*(inds.Value))*(boost.Value/1.21) mid = 1+(.08*(inds.Value))*(boost.Value/1.21) hi = 1+(.4*(inds.Value))*(boost.Value/1.21) elseif inds.Value >= 3 then low = 1+(.4*(inds.Value))*(boost.Value/1.21) mid = 1+(.08*(inds.Value))*(boost.Value/1.21) hi = 1+(.4*(inds.Value))*(boost.Value/1.21) end elseif ind.Value == "Twin" then low = 1+(.4*(inds.Value))*(boost.Value/1.21) mid = 1+(.08*(inds.Value))*(boost.Value/1.21) hi = 1+(.4*(inds.Value))*(boost.Value/1.21) elseif ind.Value == "Supercharger" then low = 1+(.1*(inds.Value))*(boost.Value/1.21) mid = 1+(.08*(inds.Value))*(boost.Value/1.21) hi = 1+(.1*(inds.Value))*(boost.Value/1.21) end end front = (FL.Parent.RotVelocity.Magnitude+FR.Parent.RotVelocity.Magnitude)/2 back = (RL.Parent.RotVelocity.Magnitude+RR.Parent.RotVelocity.Magnitude)/2 average = (front + back)/2 if carSeat.Storage.TC.Value == true then if (1.4-(front + 0)/(average + 5)) < 0.6 then ft = (1.4-(front + 0)/(average + 5)) elseif (1.4-(back + 0)/(average + 5)) < 0.6 then rt = (1.4-(back + 0)/(average + 5)) else ft = 1 rt = 1 end else ft = 1 rt = 1 end
-- ==================== -- SHOTGUN -- Enable the gun to fire multiple bullet in one shot -- ====================
ShotgunEnabled = true; BulletPerShot = 8; ShotgunReload = false; --Make user reloading like Shotgun, which user clipin shell one by one ShotgunClipinAnimationID = nil; --Set to "nil" if you don't want to animate ShotgunClipinAnimationSpeed = 1; ShellClipinSpeed = 0.5; --In second
--!strict
local LuauPolyfill = script.Parent.Parent local None = require(LuauPolyfill.Object.None) local types = require(LuauPolyfill.types) type Array<T> = types.Array<T> type Comparable = (any, any) -> number local defaultSort = function<T>(a: T, b: T): boolean return type(a) .. tostring(a) < type(b) .. tostring(b) end return function<T>(array: Array<T>, compare: Comparable?): Array<T> -- wrapperCompare interprets compare return value to be compatible with Lua's table.sort local wrappedCompare = defaultSort if compare ~= nil and compare ~= None then if typeof(compare :: any) ~= "function" then error("invalid argument to Array.sort: compareFunction must be a function") end wrappedCompare = function<T>(a: T, b: T) local result = compare(a, b) if typeof(result) ~= "number" then -- deviation: throw an error because -- it's not clearly defined what is -- the behavior when the compare function -- does not return a number error(("invalid result from compare function, expected number but got %s"):format(typeof(result))) end return result < 0 end end table.sort(array, wrappedCompare) return array end
-- camera settings
player.CameraMaxZoomDistance = 0.5 -- force first person camera.FieldOfView = 70 humanoid.CameraOffset = Vector3.new(0, 0, -0.45)
--Main Control------------------------------------------------------------------------
SignalLeft.Changed:Connect(function(On) for i, v in pairs(script.Parent.Left:GetDescendants()) do if v:IsA("BasePart") then v.Material = On and Enum.Material.Neon or Enum.Material.SmoothPlastic end end end) SignalRight.Changed:Connect(function(On) for i, v in pairs(script.Parent.Right:GetDescendants()) do if v:IsA("BasePart") then v.Material = On and Enum.Material.Neon or Enum.Material.SmoothPlastic end end end)
--[=[ @param name string @param priority number @param fn (dt: number) -> nil Calls `RunService:BindToRenderStep` and registers a function in the trove that will call `RunService:UnbindFromRenderStep` on cleanup. ```lua trove:BindToRenderStep("Test", Enum.RenderPriority.Last.Value, function(dt) -- Do something end) ``` ]=]
function Trove:BindToRenderStep(name: string, priority: number, fn: (dt: number) -> nil) RunService:BindToRenderStep(name, priority, fn) self:Add(function() RunService:UnbindFromRenderStep(name) end) end
--YourNPCsName is basically just the name of what you want to spawn-- --wait(13) is the amount of time they are on the screen(you dont have to have it)-- --Gud luck with your game!--
-- this script makes keeping track of loaded animations easy; goes inside of humanoids
local loadedAnimations = {} local module = {} function module.StopAnimation(animationName) local animation = loadedAnimations[animationName] if animation then animation:Stop() end end function module.PlayAnimation(animationName) local animation = loadedAnimations[animationName] if animation then if animation.IsPlaying == false then animation:Play() end else animation = game:GetService("ReplicatedStorage"):WaitForChild("Animations"):FindFirstChild(animationName) if animation then animation = script.Parent:LoadAnimation(animation) animation:Play() loadedAnimations[animationName] = animation end end end return module
--local equalizingForce = 236 / 1.2 -- amount of force required to levitate a mass
local equalizingForce = 180 / 1.2 -- amount of force required to levitate a mass local gravity = 1.05 -- things float at > 1 local height = nil local maxRise = 10 function onTouched(part) local h = part.Parent:FindFirstChild("Humanoid") if h ~= nil then upAndAway = true Tool.Handle.Anchored = false end end function onEquipped() --Tool.Handle.Mesh.MeshId = "http://www.roblox.com/asset/?id=25498565" upAndAway = true upAndAwayForce.Parent = Tool.Handle Tool.GripPos = Vector3.new(0,-1.75,0) Tool.GripForward = Vector3.new(0,1,0) Tool.GripRight = Vector3.new(0,0,-1) Tool.GripUp = Vector3.new(0,2,0) height = Tool.Parent.HumanoidRootPart.Position.y local lift = recursiveGetLift(Tool.Parent) float(lift) end function onUnequipped() upAndAway = false Tool.GripForward = Vector3.new(1,0,0) Tool.GripRight = Vector3.new(0,0,1) Tool.GripUp = Vector3.new(0,1,0) Tool.Handle.Mesh.Scale = Vector3.new(0.02, 0.02, 0.02) end Tool.Unequipped:connect(onUnequipped) Tool.Equipped:connect(onEquipped) Tool.Handle.Touched:connect(onTouched) function recursiveGetLift(node) local m = 0 local c = node:GetChildren() if (node:FindFirstChild("Head") ~= nil) then head = node:FindFirstChild("Head") end -- nasty hack to detect when your parts get blown off for i=1,#c do if c[i].className == "Part" then if (head ~= nil and (c[i].Position - head.Position).magnitude < 10) then -- GROSS if c[i].Name == "Handle" then m = m + (c[i]:GetMass() * equalizingForce * 1) -- hack that makes hats weightless, so different hats don't change your jump height else m = m + (c[i]:GetMass() * equalizingForce * gravity) end end end m = m + recursiveGetLift(c[i]) end return m end function updateBalloonSize() local range = (height + maxRise) - Tool.Handle.Position.y print(range) if range > 100 then Tool.Handle.Mesh.Scale = Vector3.new(0.03, 0.03, 0.03) elseif range < 100 and range > 50 then Tool.Handle.Mesh.Scale = Vector3.new(0.025, 0.025, 0.025) elseif range < 50 then Tool.Handle.Mesh.Scale = Vector3.new(0.02, 0.02, 0.02) end end function float(lift) while upAndAway do upAndAwayForce.force = Vector3.new(0,lift * 0.98,0) upAndAwayForce.Parent = Tool.Handle wait(3) upAndAwayForce.force = Vector3.new(0,lift * 0.92,0) wait(2) if Tool.Handle.Position.y > height + maxRise then upAndAway = false Tool.Handle.Pop:Play() Tool.GripPos = Vector3.new(0,-0.4,0) --Tool.Handle.Mesh.MeshId = "http://www.roblox.com/asset/?id=26725510" upAndAwayForce.Parent = nil end updateBalloonSize() end end
--local Screen = carSeat.Parent.AudioPlayerScreen.SurfaceGui <-- soon
local Song = script.Parent.AudioPlayerGui.Song local Audio = carSeat.Audio vol = 1 function changeSong() local effect = carSeat.Audio.EqualizerSoundEffect if effect.HighGain == 5 then effect.HighGain = -80 effect.MidGain = -25 onOff.Text = "IN" else effect.HighGain = 5 effect.MidGain = 7 onOff.Text = "OUT" end end function playSong() local id = player.PlayerGui.AudioPlayer.AudioPlayerGui.TextBox.Text Audio:Stop() Audio.SoundId = "http://www.roblox.com/asset/?id="..id Audio:Play() --Screen.Song.Text = game:GetService("MarketplaceService"):GetProductInfo(id).Name Song.Text = game:GetService("MarketplaceService"):GetProductInfo(id).Name --Screen.ID.Text = id end function stopSong() Audio:Stop() end function volUp() if vol + 0.1 <= 5 then vol = vol + 0.1 Audio.Volume = vol player.PlayerGui.AudioPlayer.AudioPlayerGui.Vol.Text = tostring(vol*100) .. "%" --Screen.Vol.Text = tostring(vol*100) .. "%" end end function volDown() if vol - 0.1 >= 0 then vol = vol - 0.1 Audio.Volume = vol player.PlayerGui.AudioPlayer.AudioPlayerGui.Vol.Text = tostring(vol*100) .. "%" --Screen.Vol.Text = tostring(vol*100) .. "%" end end ChangeButton.MouseButton1Click:connect(function() changeSong() end) VolUpButton.MouseButton1Click:connect(function() volUp() end) VolDownButton.MouseButton1Click:connect(function() volDown() end) PlayButton.MouseButton1Click:connect(function() playSong() end) PauseButton.MouseButton1Click:connect(function() stopSong() end)
--Tune
TuckInSpeed = 75 --At what speed you tuck in
--[[Transmission]]
Tune.TransModes = {"Semi", "Auto"} --[[ [Modes] "Auto" : Automatic shifting "Semi" : Clutchless manual shifting, dual clutch transmission "Manual" : Manual shifting with clutch >Include within brackets eg: {"Semi"} or {"Auto", "Manual"} >First mode is default mode ]] --Automatic Settings Tune.AutoShiftMode = "Speed" --[[ [Modes] "Speed" : Shifts based on wheel speed "RPM" : Shifts based on RPM ]] Tune.AutoUpThresh = -200 --Automatic upshift point (relative to peak RPM, positive = Over-rev) Tune.AutoDownThresh = 1400 --Automatic downshift point (relative to peak RPM, positive = Under-rev) --Gear Ratios Tune.FinalDrive = 3.97 -- Gearing determines top speed and wheel torque Tune.Ratios = { -- Higher ratio = more torque, Lower ratio = higher top speed --[[Reverse]] 3.42 , -- Copy and paste a ratio to add a gear --[[Neutral]] 0 , -- Ratios can also be deleted --[[ 1 ]] 3.75 , -- Reverse, Neutral, and 1st gear are required --[[ 2 ]] 2.10 , --[[ 3 ]] 1.40 , --[[ 4 ]] 1.00 , --[[ 5 ]] 0.71 , --[[ 6 ]] 0.61 , --[[ 7 ]] 0.51 , } Tune.FDMult = 1 -- Ratio multiplier (Change this value instead of FinalDrive if car is struggling with torque ; Default = 1)
--LIGHTING FUNCTIONS
script.Parent.OnServerEvent:connect(function(pl,n) if lt~=1 then pr = true else pr=false end lt=n if n == 0 then UpdateLt(1,white) UpdatePt(false,white) StopMt(pr) elseif (n == 1 or n == 2) then RefMt.DesiredAngle = RefMt.CurrentAngle%math.rad(360) RefMt.CurrentAngle = RefMt.CurrentAngle%math.rad(360) UpdateLt(.25,red) UpdatePt(true,red) UpdateMt(0,math.rad(225),4) wait(.75) repeat UpdateMt(0,math.rad(135),0) wait(.5) if lt~=1 and lt~=2 then break end UpdateMt(0,math.rad(225),0) wait(.5) until (lt~=1 and lt~= 2) elseif n == 3 then wait(.5) UpdateLt(.25,red) UpdatePt(true,red) UpdateMt(0,9e9,1) end end)
--!nonstrict
local Players = game:GetService("Players") local TweenService = game:GetService("TweenService") local LocalPlayer = Players.LocalPlayer if not LocalPlayer then Players:GetPropertyChangedSignal("LocalPlayer"):Wait() LocalPlayer = Players.LocalPlayer end local function waitForChildOfClass(parent: Instance, class: string) local child = parent:FindFirstChildOfClass(class) while not child or child.ClassName ~= class do child = parent.ChildAdded:Wait() end return child end local PlayerGui = waitForChildOfClass(LocalPlayer, "PlayerGui") local TOAST_OPEN_SIZE = UDim2.new(0, 326, 0, 58) local TOAST_CLOSED_SIZE = UDim2.new(0, 80, 0, 58) local TOAST_BACKGROUND_COLOR = Color3.fromRGB(32, 32, 32) local TOAST_BACKGROUND_TRANS = 0.4 local TOAST_FOREGROUND_COLOR = Color3.fromRGB(200, 200, 200) local TOAST_FOREGROUND_TRANS = 0
--// All global vars will be wiped/replaced except script
return function(data, env) if env then setfenv(1, env) end --local client = service.GarbleTable(client) local Player = service.Players.LocalPlayer local Mouse = Player:GetMouse() local InputService = service.UserInputService local gIndex = data.gIndex local gTable = data.gTable local Event = gTable.BindEvent local GUI = gTable.Object local Name = data.Name local Icon = data.Icon local Size = data.Size local Menu = data.Menu local Title = data.Title local Ready = data.Ready local Walls = data.Walls local noHide = data.NoHide local noClose = data.NoClose local onReady = data.OnReady local onClose = data.OnClose local onResize = data.OnResize local onRefresh = data.OnRefresh local onMinimize = data.OnMinimize local ContextMenu = data.ContextMenu local ResetOnSpawn = data.ResetOnSpawn local CanKeepAlive = data.CanKeepAlive local iconClicked = data.IconClicked local SizeLocked = data.SizeLocked or data.SizeLock local CanvasSize = data.CanvasSize local Position = data.Position local Content = data.Content or data.Children local MinSize = data.MinSize or {150, 50} local MaxSize = data.MaxSize or {math.huge, math.huge} local curIcon = Mouse.Icon local isClosed = false local Resizing = false local Refreshing = false local DragEnabled = true local checkProperty = service.CheckProperty local specialInsts = {} local inExpandable local addTitleButton local LoadChildren local BringToFront local Drag = GUI.Drag local Close = Drag.Close local Hide = Drag.Hide local Iconf = Drag.Icon local Titlef = Drag.Title local Refresh = Drag.Refresh local rSpinner = Refresh.Spinner local Main = Drag.Main local Tooltip = GUI.Desc local ScrollFrame = GUI.Drag.Main.ScrollingFrame local LeftSizeIcon = Main.LeftResizeIcon local RightSizeIcon = Main.RightResizeIcon local RightCorner = Main.RightCorner local LeftCorner = Main.LeftCorner local RightSide = Main.RightSide local LeftSide = Main.LeftSide local TopRight = Main.TopRight local TopLeft = Main.TopLeft local Bottom = Main.Bottom local Top = Main.Top function Expand(ent, point, text) local label = point:FindFirstChild("Label") if label then local rounder = service.New("UICorner",{ CornerRadius = UDim.new(0,5.5); Parent = point; }); ent.MouseLeave:Connect(function(x,y) if inExpandable == ent then point.Visible = false end end) ent.MouseMoved:Connect(function(x,y) inExpandable = ent local text = text or ent.Desc.Value label.Text = text label.Font = Enum.Font.Gotham label.TextSize = 15 label.TextStrokeTransparency = 1 local sizeText = label.ContentText local maxWidth = 400 local bounds = service.TextService:GetTextSize(sizeText, label.TextSize, label.Font, Vector2.new(maxWidth, math.huge)) local sizeX, sizeY = bounds.X + 10, bounds.Y + 10 local posX = (x + 6 + sizeX) < GUI.AbsoluteSize.X and (x + 6) or (x - 6 - sizeX) local posY = (y - 6 - sizeY) > 0 and (y - 6 - sizeY) or (y) point.Size = UDim2.new(0, sizeX, 0, sizeY) point.Position = UDim2.new(0, posX, 0, posY) point.BackgroundColor3 = Color3.fromRGB(26, 26, 26) point.Visible = true end) end end function getNextPos(frame) local farXChild, farYChild for i,v in next,frame:GetChildren() do if checkProperty(v, "Size") then if not farXChild or (v.AbsolutePosition.X + v.AbsoluteSize.X) > (farXChild.AbsolutePosition.X + farXChild.AbsoluteSize.X) then farXChild = v end if not farYChild or (v.AbsolutePosition.Y + v.AbsoluteSize.Y) > (farXChild.AbsolutePosition.Y + farXChild.AbsoluteSize.Y) then farYChild = v end end end return ((not farXChild or not farYChild) and UDim2.new(0,0,0,0)) or UDim2.new(farXChild.Position.X.Scale, farXChild.Position.X.Offset + farXChild.AbsoluteSize.X, farYChild.Position.Y.Scale, farYChild.Position.Y.Offset + farYChild.AbsoluteSize.Y) end function LoadChildren(Obj, Children) if Children then local runWhenDone = Children.RunWhenDone and functionify(Children.RunWhenDone, Obj) for class,data in next,Children do if type(data) == "table" then if not data.Parent then data.Parent = Obj end create(data.Class or data.ClassName or class, data) elseif type(data) == "function" or type(data) == "string" and not runWhenDone then runWhenDone = functionify(data, Obj) end end if runWhenDone then runWhenDone(Obj) end end end function BringToFront() for i,v in ipairs(Player.PlayerGui:GetChildren()) do if v:FindFirstChild("__ADONIS_WINDOW") then v.DisplayOrder = 100 end end GUI.DisplayOrder = 101 end function addTitleButton(data) local startPos = 1 local realPos local new local original = Hide if Hide.Visible then startPos = startPos+1 end if Close.Visible then startPos = startPos+1 end if Refresh.Visible then startPos = startPos+1 end realPos = UDim2.new(1, -(((30*startPos)+5)+(startPos-1)), 0, 0) data.Position = data.Position or realPos data.Size = data.Size or original.Size data.BackgroundColor3 = data.BackgroundColor3 or original.BackgroundColor3 data.BackgroundTransparency = data.BackgroundTransparency or original.BackgroundTransparency data.BorderSizePixel = data.BorderSizePixel or original.BorderSizePixel data.ZIndex = data.ZIndex or original.ZIndex data.TextColor3 = data.TextColor3 or original.TextColor3 data.TextScaled = data.TextScaled or original.TextScaled data.TextStrokeColor3 = data.TextStrokeColor3 or original.TextStrokeColor3 data.TextSize = data.TextSize or original.TextSize data.TextTransparency = data.TextTransparency or original.TextTransparency data.TextStrokeTransparency = data.TextStrokeTransparency or original.TextStrokeTransparency data.TextScaled = data.TextScaled or original.TextScaled data.TextWrapped = data.TextWrapped or original.TextWrapped data.Font = Enum.Font.Gotham data.Parent = Drag --local round = Drag.Close.UICorner:Clone() -- round.Parent = data --data.TextXAlignment = data.TextXAlignment or original.TextXAlignment --data.TextYAlignment = data.TextYAlignment or original.TextYAlignment local instancefinally = create("TextButton", data) local rounder = service.New("UICorner",{ CornerRadius = UDim.new(0.2,0); Parent = instancefinally; }); return instancefinally end function functionify(func, object) if type(func) == "string" then if object then local env = GetEnv() env.Object = object return client.Core.LoadCode(func, env) else return client.Core.LoadCode(func) end else return func end end function create(class, dataFound, existing) local data = dataFound or {} local class = data.Class or data.ClassName or class local new = existing or (specialInsts[class] and specialInsts[class]:Clone()) or service.New(class) local parent = data.Parent or new.Parent if dataFound then data.Parent = nil if data.Class or data.ClassName then data.Class = nil data.ClassName = nil end if not data.BorderColor3 and checkProperty(new,"BorderColor3") then new.BorderColor3 = dBorder end if not data.CanvasSize and checkProperty(new,"CanvasSize") then new.CanvasSize = dCanvasSize end if not data.BorderSizePixel and checkProperty(new,"BorderSizePixel") then new.BorderSizePixel = dPixelSize end if not data.BackgroundColor3 and checkProperty(new,"BackgroundColor3") then new.BackgroundColor3 = dBackground end if not data.PlaceholderColor3 and checkProperty(new,"PlaceholderColor3") then new.PlaceholderColor3 = dPlaceholderColor end if not data.Transparency and not data.BackgroundTransparency and checkProperty(new,"Transparency") then new.BackgroundTransparency = dTransparency elseif data.Transparency then new.BackgroundTransparency = data.Transparency end if not data.TextColor3 and not data.TextColor and checkProperty(new,"TextColor3") then new.TextColor3 = dTextColor elseif data.TextColor then new.TextColor3 = data.TextColor end if not data.Font and checkProperty(new, "Font") then data.Font = "Gotham" end if not data.TextSize and checkProperty(new, "TextSize") then data.TextSize = dTextSize end if not data.BottomImage and not data.MidImage and not data.TopImage and class == "ScrollingFrame" then new.BottomImage = dScrollImage new.MidImage = dScrollImage new.TopImage = dScrollImage end if not data.Size and checkProperty(new,"Size") then new.Size = dSize end if not data.Position and checkProperty(new,"Position") then new.Position = dPosition end if not data.ZIndex and checkProperty(new,"ZIndex") then new.ZIndex = dZIndex if parent and checkProperty(parent, "ZIndex") then new.ZIndex = parent.ZIndex end end if not data.ClearTextOnFocus and class == "TextBox" then new.ClearTextOnFocus = false end if data.TextChanged and class == "TextBox" then local textChanged = functionify(data.TextChanged, new) new.FocusLost:Connect(function(enterPressed) textChanged(new.Text, enterPressed, new) end) end if (class == "TextButton" or class == "TextLabel") then if not data.TextTruncate then data.TextTruncate = Enum.TextTruncate.AtEnd -- Truncate Text by default because looks weird if Expertcoderz hasn't implemented a proper min window size end end if (data.OnClicked or data.OnClick) and (class == "TextButton" or class == "ImageButton") then local debounce = false; local doDebounce = data.Debounce; local onClick = functionify((data.OnClicked or data.OnClick), new) new.MouseButton1Down:Connect(function() if not debounce then if doDebounce then debounce = true end onClick(new); debounce = false; end end) end if data.Events then for event,func in pairs(data.Events) do local realFunc = functionify(func, new) Event(new[event], function(...) realFunc(...) end) end end if data.Visible == nil then data.Visible = true end if data.LabelProps then data.LabelProperties = data.LabelProps end end if class == "Entry" then local label = new.Text local dots = new.Dots local desc = new.Desc label.ZIndex = data.ZIndex or new.ZIndex dots.ZIndex = data.ZIndex or new.ZIndex if data.Text then new.Text.Text = data.Text new.Text.Visible = true data.Text = nil end if data.Desc or data.ToolTip then new.Desc.Value = data.Desc or data.ToolTip data.Desc = nil end Expand(new, Tooltip) else if data.ToolTip then Expand(new, Tooltip, data.ToolTip) end end if class == "ButtonEntry" then local button = new.Button local debounce = false local onClicked = functionify(data.OnClicked, button) new:SetSpecial("DoClick",function() if not debounce then debounce = true if onClicked then onClicked(button) end debounce = false end end) new.Text = data.Text or new.Text button.ZIndex = data.ZIndex or new.ZIndex button.MouseButton1Down:Connect(new.DoClick) end if class == "Boolean" then local enabled = data.Enabled local debounce = false local onToggle = functionify(data.OnToggle, new) local function toggle(isEnabled) if not debounce then debounce = true if (isEnabled ~= nil and isEnabled) or (isEnabled == nil and enabled) then enabled = false new.Text = "Disabled" new.TextColor3 = Color3.fromRGB(243, 64, 10) elseif (isEnabled ~= nil and isEnabled == false) or (isEnabled == nil and not enabled) then enabled = true new.Text = "Enabled" new.TextColor3 = Color3.fromRGB(40, 243, 97) end if onToggle then onToggle(enabled, new) end debounce = false end end --new.ZIndex = data.ZIndex new.Text = (enabled and "Enabled") or "Disabled" new.TextColor3 = (enabled and Color3.fromRGB(40, 243, 97)) or Color3.fromRGB(243, 64, 10) new.MouseButton1Down:Connect(function() if onToggle then toggle() end end) new:SetSpecial("Toggle",function(ignore, isEnabled) toggle(isEnabled) end) end if class == "TextString" then local enabled = data.Text local ColorText = data.ColorText local onToggle = functionify(data.OnToggle, new) --new.ZIndex = data.ZIndex new.Text = enabled new.TextColor3 = ColorText end if class == "StringEntry" then local box = new.Box local ignore new.Text = data.Text or new.Text box.ZIndex = data.ZIndex or new.ZIndex if data.BoxText then box.Text = data.BoxText end if data.BoxProperties then for i,v in next,data.BoxProperties do if checkProperty(box, i) then box[i] = v end end end if data.TextChanged then local textChanged = functionify(data.TextChanged, box) box.Changed:Connect(function(p) if p == "Text" and not ignore then textChanged(box.Text) end end) box.FocusLost:Connect(function(enter) local change = textChanged(box.Text, true, enter) if change then ignore = true box.Text = change ignore = false end end) end new:SetSpecial("SetValue",function(ignore, newValue) box.Text = newValue end) end if class == "Slider" then local mouseIsIn = false local posValue = new.Percentage local slider = new.Slider local bar = new.SliderBar local drag = new.Drag local moving = false local value = 0 local onSlide = functionify(data.OnSlide, new) bar.ZIndex = data.ZIndex or new.ZIndex slider.ZIndex = bar.ZIndex+1 drag.ZIndex = slider.ZIndex+1 drag.Active = true if data.Value then slider.Position = UDim2.new(0.5, -10, 0.5, -10) drag.Position = slider.Position end bar.InputBegan:Connect(function(input) if not moving and (input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch) then value = ((input.Position.X) - (new.AbsolutePosition.X)) / (new.AbsoluteSize.X) if value < 0 then value = 0 elseif value > 1 then value = 1 end slider.Position = UDim2.new(value, -10, 0.5, -10) drag.Position = slider.Position posValue.Value = value if onSlide then onSlide(value) end end end) drag.DragBegin:Connect(function() moving = true end) drag.DragStopped:Connect(function() moving = false drag.Position = slider.Position end) drag.Changed:Connect(function() if moving then value = ((Mouse.X)-(new.AbsolutePosition.X))/(new.AbsoluteSize.X) if value < 0 then value = 0 elseif value > 1 then value = 1 end slider.Position = UDim2.new(value, -10, 0.5, -10) posValue.Value = value if onSlide then onSlide(value) end end end) new:SetSpecial("SetValue",function(ignore, newValue) if newValue and tonumber(newValue) then value = tonumber(newValue) posValue.Value = value slider.Position = UDim2.new(value, -10, 0.5, -10) drag.Position = slider.Position end end) end if class == "Dropdown" then local menu = new.Menu local downImg = new.Down local selected = new.dSelected local options = data.Options local curSelected = data.Selected or data.Selection local onSelect = functionify(data.OnSelection or data.OnSelect or function()end) local textProps = data.TextProperties local scroller = create("ScrollingFrame", { Parent = menu; Size = UDim2.new(1, 0, 1, 0); Position = UDim2.new(0, 0, 0, 0); BackgroundTransparency = 1; ZIndex = 100; }) menu.ZIndex = scroller.ZIndex menu.Parent = GUI menu.Visible = false menu.Size = UDim2.new(0, new.AbsoluteSize.X, 0, 100); menu.BackgroundColor3 = data.BackgroundColor3 or new.BackgroundColor3 if data.TextAlignment then selected.TextXAlignment = data.TextAlignment selected.Position = UDim2.new(0, 30, 0, 0); end if data.NoArrow then downImg.Visible = false end new:SetSpecial("MenuContainer", menu) new.Changed:Connect(function(p) if p == "AbsolutePosition" and menu.Visible then menu.Position = UDim2.new(0, new.AbsolutePosition.X, 0, new.AbsolutePosition.Y+new.AbsoluteSize.Y) elseif p == "AbsoluteSize" or p == "Parent" then downImg.Size = UDim2.new(0, new.AbsoluteSize.Y, 1, 0); if data.TextAlignment == "Right" then downImg.Position = UDim2.new(0, 0, 0.5, -(downImg.AbsoluteSize.X/2)) selected.Position = UDim2.new(0, new.AbsoluteSize.Y, 0, 0); else downImg.Position = UDim2.new(1, -downImg.AbsoluteSize.X, 0.5, -(downImg.AbsoluteSize.X/2)) end selected.Size = UDim2.new(1, -downImg.AbsoluteSize.X, 1, 0); if options and #options <= 6 then menu.Size = UDim2.new(0, new.AbsoluteSize.X, 0, 30*#options); else menu.Size = UDim2.new(0, new.AbsoluteSize.X, 0, 30*6); scroller:ResizeCanvas(false, true); end end end) selected.ZIndex = new.ZIndex downImg.ZIndex = new.ZIndex if textProps then for i,v in next,textProps do selected[i] = v end end if options then for i,v in next,options do local button = scroller:Add("TextButton", { Text = " ".. tostring(v); Size = UDim2.new(1, -10, 0, 30); Position = UDim2.new(0, 5, 0, 30*(i-1)); ZIndex = menu.ZIndex; BackgroundTransparency = 1; OnClick = function() selected.Text = v; onSelect(v, new); menu.Visible = false end }) if textProps then for i,v in next,textProps do button[i] = v end end end if curSelected then selected.Text = curSelected else selected.Text = "No Selection" end selected.MouseButton1Down:Connect(function() menu.Position = UDim2.new(0, new.AbsolutePosition.X, 0, new.AbsolutePosition.Y+new.AbsoluteSize.Y) menu.Visible = not menu.Visible end) end end if class == "TabFrame" then local buttons = create("ScrollingFrame", nil, new.Buttons) local frames = new.Frames local numTabs = 0 local buttonSize = data.ButtonSize or 60 new.BackgroundTransparency = data.BackgroundTransparency or 1 buttons.ZIndex = data.ZIndex or new.ZIndex frames.ZIndex = buttons.ZIndex new:SetSpecial("GetTab", function(ignore, name) return frames:FindFirstChild(name) end) new:SetSpecial("NewTab", function(ignore, name, data) local data = data or {} --local numChildren = #frames:GetChildren() local nextPos = getNextPos(buttons); local textSize = service.TextService:GetTextSize(data.Text or name, dTextSize, dFont, buttons.AbsoluteSize) local oTextTrans = data.TextTransparency local isOpen = false local disabled = false local tabFrame = create("ScrollingFrame",{ Name = name; Size = UDim2.new(1, 0, 1, 0); Position = UDim2.new(0, 0, 0, 0); BorderSizePixel = 0; BackgroundTransparency = data.FrameTransparency or data.Transparency; BackgroundColor3 = Color3.fromRGB(24, 24, 24); ZIndex = buttons.ZIndex; Visible = false; }) local tabButton = create("TextButton",{ Name = name; Text = data.Text or name; Size = UDim2.new(0, textSize.X+20, 1, 0); ZIndex = buttons.ZIndex; Position = UDim2.new(0, (nextPos.X.Offset > 0 and nextPos.X.Offset+5) or 0, 0, 0); TextColor3 = data.TextColor; Font = Enum.Font.Gotham; BackgroundTransparency = 0.7; TextTransparency = data.TextTransparency; BackgroundColor3 = Color3.fromRGB(24, 24, 24); BorderSizePixel = 0; }) local round1 = Instance.new("UICorner") round1.Parent = tabButton round1.CornerRadius = UDim.new(0.2,0) tabFrame:SetSpecial("FocusTab",function() for i,v in next,buttons:GetChildren() do if isGui(v) then v.BackgroundTransparency = 0.7 v.TextTransparency = 0.7 end end for i,v in next,frames:GetChildren() do if isGui(v) then v.Visible = false end end tabButton.BackgroundTransparency = data.Transparency or 0 tabButton.TextTransparency = data.TextTransparency or 0 tabFrame.Visible = true if data.OnFocus then data.OnFocus(true) end end) local round2 = Instance.new("UICorner") round2.Parent = tabFrame round2.CornerRadius = UDim.new(0.2,0) if numTabs == 0 then tabFrame.Visible = true tabButton.BackgroundTransparency = data.Transparency or 0 end tabButton.MouseButton1Down:Connect(function() if not disabled then tabFrame:FocusTab() end end) tabButton.Parent = buttons tabFrame.Parent = frames buttons:ResizeCanvas(true, false) tabFrame:SetSpecial("Disable", function() disabled = true; tabButton.BackgroundTransparency = 0.9; tabButton.TextTransparency = 0.9 end) tabFrame:SetSpecial("Enable", function() disabled = false; tabButton.BackgroundTransparency = 0.7; tabButton.TextTransparency = data.TextTransparency or 0; end) numTabs = numTabs+1; return tabFrame,tabButton end) end if class == "ScrollingFrame" then local genning = false if not data.ScrollBarThickness then data.ScrollBarThickness = dScrollBar end new:SetSpecial("GenerateList", function(obj, list, labelProperties, bottom) local list = list or obj; local genHold = {} local entProps = labelProperties or {} genning = genHold new:ClearAllChildren() local num = 0 for i,v in next,list do local text = v; local desc; local color local richText; if type(v) == "table" then text = v.Text desc = v.Desc color = v.Color if v.RichTextAllowed or entProps.RichTextAllowed then richText = true end end local label = create("TextLabel",{ Text = " "..tostring(text); ToolTip = desc; Size = UDim2.new(1,-5,0,(entProps.ySize or 20)); Visible = true; BackgroundTransparency = 1; Font = "Gotham"; TextSize = 14; TextStrokeTransparency = 0.8; TextXAlignment = "Left"; Position = UDim2.new(0,0,0,num*(entProps.ySize or 20)); RichText = richText or false; }) if color then label.TextColor3 = color end if labelProperties then for i,v in next,entProps do if checkProperty(label, i) then label[i] = v end end end if genning == genHold then label.Parent = new; else label:Destroy() break end num = num+1 if data.Delay then if type(data.Delay) == "number" then wait(data.Delay) elseif i%100 == 0 then wait(0.1) end end end new:ResizeCanvas(false, true, false, bottom, 5, 5, 50) genning = nil end) new:SetSpecial("ResizeCanvas", function(ignore, onX, onY, xMax, yMax, xPadding, yPadding, modBreak) local xPadding,yPadding = data.xPadding or 5, data.yPadding or 5 local newY, newX = 0,0 if not onX and not onY then onX = false onY = true end for i,v in next,new:GetChildren() do if v:IsA("GuiObject") then if onY then v.Size = UDim2.new(v.Size.X.Scale, v.Size.X.Offset, 0, v.AbsoluteSize.Y) v.Position = UDim2.new(v.Position.X.Scale, v.Position.X.Offset, 0, v.AbsolutePosition.Y-new.AbsolutePosition.Y) end if onX then v.Size = UDim2.new(0, v.AbsoluteSize.X, v.Size.Y.Scale, v.Size.Y.Offset) v.Position = UDim2.new(0, v.AbsolutePosition.X-new.AbsolutePosition.X, v.Position.Y.Scale, v.Position.Y.Offset) end local yLower = v.Position.Y.Offset + v.Size.Y.Offset local xLower = v.Position.X.Offset + v.Size.X.Offset newY = math.max(newY, yLower) newX = math.max(newX, xLower) if modBreak then if i%modBreak == 0 then wait(1/60) end end end end if onY then new.CanvasSize = UDim2.new(new.CanvasSize.X.Scale, new.CanvasSize.X.Offset, 0, newY+yPadding) end if onX then new.CanvasSize = UDim2.new(0, newX + xPadding, new.CanvasSize.Y.Scale, new.CanvasSize.Y.Offset) end if xMax then new.CanvasPosition = Vector2.new((newX + xPadding)-new.AbsoluteSize.X, new.CanvasPosition.Y) end if yMax then new.CanvasPosition = Vector2.new(new.CanvasPosition.X, (newY+yPadding)-new.AbsoluteSize.Y) end end) if data.List then new:GenerateList(data.List) data.List = nil end end LoadChildren(new, data.Content or data.Children) data.Children = nil data.Content = nil for i,v in next,data do if checkProperty(new, i) then new[i] = v end end new.Parent = parent return apiIfy(new, data, class),data end function apiIfy(gui, data, class) local newGui = service.Wrap(gui) gui:SetSpecial("Object", gui) gui:SetSpecial("SetPosition", function(ignore, newPos) gui.Position = newPos end) gui:SetSpecial("SetSize", function(ingore, newSize) gui.Size = newSize end) gui:SetSpecial("Add", function(ignore, class, data) if not data then data = class class = ignore end local new = create(class,data); new.Parent = gui; return apiIfy(new, data, class) end) gui:SetSpecial("Copy", function(ignore, class, gotData) local newData = {} local new for i,v in next,data do newData[i] = v end for i,v in next,gotData do newData[i] = v end new = create(class or data.Class or gui.ClassName, newData); new.Parent = gotData.Parent or gui.Parent; return apiIfy(new, data, class) end) return newGui end function doClose() if not isClosed then isClosed = true gTable:Destroy() end end function isVisible() return Main.Visible end function doHide(doHide) local origLH = Hide.LineHeight if doHide or (doHide == nil and Main.Visible) then dragSize = Drag.Size Main.Parent.Minimized.Visible = true Main.Visible = false Drag.BackgroundColor3 = Main.BackgroundColor3 Drag.Size = dragSize or Drag.Size Hide.Outer.Image = "rbxassetid://7472853084" --Hide.Text = "" Hide.LineHeight = origLH gTable.Minimized = true elseif doHide == false or (doHide == nil and not Main.Visible) then Main.Visible = true Main.Parent.Minimized.Visible = false Drag.Size = dragSize or Drag.Size Hide.Outer.Image = "rbxassetid://7462814901" Hide.LineHeight = origLH gTable.Minimized = false end if onMinimize then onMinimize(Main.Visible) end if Walls then wallPosition() end end function isInFrame(x, y, frame) if x > frame.AbsolutePosition.X and x < (frame.AbsolutePosition.X+frame.AbsoluteSize.X) and y > frame.AbsolutePosition.Y and y < (frame.AbsolutePosition.Y+frame.AbsoluteSize.Y) then return true else return false end end function wallPosition() if gTable.Active then local x,y = Drag.AbsolutePosition.X, Drag.AbsolutePosition.Y local abx, gx, gy = Drag.AbsoluteSize.X, GUI.AbsoluteSize.X, GUI.AbsoluteSize.Y local ySize = (Main.Visible and Main.AbsoluteSize.Y) or Drag.AbsoluteSize.Y if x < 0 then Drag.Position = UDim2.new(0, 0, Drag.Position.Y.Scale, Drag.Position.Y.Offset) end if y < 0 then Drag.Position = UDim2.new(Drag.Position.X.Scale, Drag.Position.X.Offset, 0, 0) end if x + abx > gx then Drag.Position = UDim2.new(0, GUI.AbsoluteSize.X - Drag.AbsoluteSize.X, Drag.Position.Y.Scale, Drag.Position.Y.Offset) end if y + ySize > gy then Drag.Position = UDim2.new(Drag.Position.X.Scale, Drag.Position.X.Offset, 0, GUI.AbsoluteSize.Y - ySize) end end end function setSize(newSize) if newSize and type(newSize) == "table" then if newSize[1] < 50 then newSize[1] = 50 end if newSize[2] < 50 then newSize[2] = 50 end Drag.Size = UDim2.new(0,newSize[1],0,25) Main.Size = UDim2.new(1,0,0,newSize[2]) end end function setPosition(newPos) if newPos and typeof(newPos) == "UDim2" then Drag.Position = newPos elseif newPos and type(newPos) == "table" then Drag.Position = UDim2.new(0, newPos[1], 0, newPos[2]) elseif Size and not newPos then Drag.Position = UDim2.new(0.5, -Drag.AbsoluteSize.X/2, 0.5, -Main.AbsoluteSize.Y/2) end end if Name then gTable.Name = Name if data.AllowMultiple ~= nil and data.AllowMultiple == false then local found, num = client.UI.Get(Name, GUI, true) if found then doClose() return nil end end end if Size then setSize(Size) end if Position then setPosition(Position) end if Title then Titlef.Text = Title end if CanKeepAlive or not ResetOnSpawn then gTable.CanKeepAlive = true GUI.ResetOnSpawn = false elseif ResetOnSpawn then gTable.CanKeepAlive = false GUI.ResetOnSpawn = true end if Icon then Iconf.Visible = true Iconf.Image = Icon end if CanvasSize then ScrollFrame.CanvasSize = CanvasSize end if noClose then Close.Visible = false Refresh.Position = Hide.Position Hide.Position = Close.Position end if noHide then Hide.Visible = false Refresh.Position = Hide.Position end if Walls then Drag.DragStopped:Connect(function() wallPosition() end) end if onRefresh then local debounce = false function DoRefresh() if not Refreshing then local done = false Refreshing = true spawn(function() while gTable.Active and not done do for i = 0,180,10 do rSpinner.Rotation = -i wait(1/60) end end end) onRefresh() wait(1) done = true Refreshing = false end end Refresh.MouseButton1Down:Connect(function() if not debounce then debounce = true DoRefresh() debounce = false end end) Titlef.Size = UDim2.new(1, -130, Titlef.Size.Y.Scale, Titlef.Size.Y.Offset) else Refresh.Visible = false end if iconClicked then Iconf.MouseButton1Down(function() iconClicked(data, GUI, Iconf) end) end if Menu then data.Menu.Text = "" data.Menu.Parent = Main data.Menu.Size = UDim2.new(1,-10,0,25) data.Menu.Position = UDim2.new(0,5,0,25) ScrollFrame.Size = UDim2.new(1,-10,1,-55) ScrollFrame.Position = UDim2.new(0,5,0,50) data.Menu.BackgroundColor3 = Color3.fromRGB(216, 216, 216) data.Menu.BorderSizePixel = 0 create("TextLabel",data.Menu) end if not SizeLocked then local startXPos = Drag.AbsolutePosition.X local startYPos = Drag.AbsolutePosition.Y local startXSize = Drag.AbsoluteSize.X local startYSize = Drag.AbsoluteSize.Y local vars = client.Variables local newIcon local inFrame local ReallyInFrame local function readify(obj) obj.MouseEnter:Connect(function() ReallyInFrame = obj end) obj.MouseLeave:Connect(function() if ReallyInFrame == obj then ReallyInFrame = nil end end) end --[[ readify(Drag) readify(ScrollFrame) readify(TopRight) readify(TopLeft) readify(RightCorner) readify(LeftCorner) readify(RightSide) readify(LeftSide) readify(Bottom) readify(Top) --]] function checkMouse(x, y) --// Update later to remove frame by frame pos checking if gTable.Active and Main.Visible then if isInFrame(x, y, Drag) or isInFrame(x, y, ScrollFrame) then inFrame = nil newIcon = nil elseif isInFrame(x, y, TopRight) then inFrame = "TopRight" newIcon = MouseIcons.TopRight elseif isInFrame(x, y, TopLeft) then inFrame = "TopLeft" newIcon = MouseIcons.TopLeft elseif isInFrame(x, y, RightCorner) then inFrame = "RightCorner" newIcon = MouseIcons.RightCorner elseif isInFrame(x, y, LeftCorner) then inFrame = "LeftCorner" newIcon = MouseIcons.LeftCorner elseif isInFrame(x, y, RightSide) then inFrame = "RightSide" newIcon = MouseIcons.Horizontal elseif isInFrame(x, y, LeftSide) then inFrame = "LeftSide" newIcon = MouseIcons.Horizontal elseif isInFrame(x, y, Bottom) then inFrame = "Bottom" newIcon = MouseIcons.Vertical elseif isInFrame(x, y, Top) then inFrame = "Top" newIcon = MouseIcons.Vertical else inFrame = nil newIcon = nil end else inFrame = nil end if (not client.Variables.MouseLockedBy) or client.Variables.MouseLockedBy == gTable then if inFrame and newIcon then Mouse.Icon = newIcon client.Variables.MouseLockedBy = gTable elseif client.Variables.MouseLockedBy == gTable then Mouse.Icon = curIcon client.Variables.MouseLockedBy = nil end end end local function inputStart(x, y) checkMouse(x, y) if gTable.Active and inFrame and not Resizing and not isInFrame(x, y, ScrollFrame) and not isInFrame(x, y, Drag) then Resizing = inFrame startXPos = Drag.AbsolutePosition.X startYPos = Drag.AbsolutePosition.Y startXSize = Drag.AbsoluteSize.X startYSize = Main.AbsoluteSize.Y end end local function inputEnd() if gTable.Active then if Resizing and onResize then onResize(UDim2.new(Drag.Size.X.Scale, Drag.Size.X.Offset, Main.Size.Y.Scale, Main.Size.Y.Offset)) end Resizing = nil Mouse.Icon = curIcon --DragEnabled = true --if Walls then -- wallPosition() --end end end local function inputMoved(x, y) if gTable.Active then if Mouse.Icon ~= MouseIcons.TopRight and Mouse.Icon ~= MouseIcons.TopLeft and Mouse.Icon ~= MouseIcons.RightCorner and Mouse.Icon ~= MouseIcons.LeftCorner and Mouse.Icon ~= MouseIcons.Horizontal and Mouse.Icon ~= MouseIcons.Vertical then curIcon = Mouse.Icon end if Resizing then local moveX = false local moveY = false local newPos = Drag.Position local xPos, yPos = x, y local newX, newY = startXSize, startYSize --DragEnabled = false if Resizing == "TopRight" then newX = (xPos - startXPos) + 3 newY = (startYPos - yPos) + startYSize -1 moveY = true elseif Resizing == "TopLeft" then newX = (startXPos - xPos) + startXSize -1 newY = (startYPos - yPos) + startYSize -1 moveY = true moveX = true elseif Resizing == "RightCorner" then newX = (xPos - startXPos) + 3 newY = (yPos - startYPos) + 3 elseif Resizing == "LeftCorner" then newX = (startXPos - xPos) + startXSize + 3 newY = (yPos - startYPos) + 3 moveX = true elseif Resizing == "LeftSide" then newX = (startXPos - xPos) + startXSize + 3 newY = startYSize moveX = true elseif Resizing == "RightSide" then newX = (xPos - startXPos) + 3 newY = startYSize elseif Resizing == "Bottom" then newX = startXSize newY = (yPos - startYPos) + 3 elseif Resizing == "Top" then newX = startXSize newY = (startYPos - yPos) + startYSize - 1 moveY = true end if newX < MinSize[1] then newX = MinSize[1] end if newY < MinSize[2] then newY = MinSize[2] end if newX > MaxSize[1] then newX = MaxSize[1] end if newY > MaxSize[2] then newY = MaxSize[2] end if moveX then newPos = UDim2.new(0, (startXPos+startXSize)-newX, newPos.Y.Scale, newPos.Y.Offset) end if moveY then newPos = UDim2.new(newPos.X.Scale, newPos.X.Offset, 0, (startYPos+startYSize)-newY) end Drag.Position = newPos Drag.Size = UDim2.new(0, newX, Drag.Size.Y.Scale, Drag.Size.Y.Offset) Main.Size = UDim2.new(Main.Size.X.Scale, Main.Size.X.Offset, 0, newY) if not Titlef.TextFits then Titlef.Visible = false else Titlef.Visible = true end else checkMouse(x, y) end end end Event(InputService.InputBegan, function(input, gameHandled) if not gameHandled and (input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch) then local Position = input.Position inputStart(Position.X, Position.Y) end end) Event(InputService.InputChanged, function(input, gameHandled) if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then local Position = input.Position inputMoved(Position.X, Position.Y) end end) Event(InputService.InputEnded, function(input, gameHandled) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then inputEnd() end end) --[[Event(Mouse.Button1Down, function() if gTable.Active and inFrame and not Resizing and not isInFrame(Mouse.X, Mouse.Y, ScrollFrame) and not isInFrame(Mouse.X, Mouse.Y, Drag) then Resizing = inFrame startXPos = Drag.AbsolutePosition.X startYPos = Drag.AbsolutePosition.Y startXSize = Drag.AbsoluteSize.X startYSize = Main.AbsoluteSize.Y checkMouse() end end) Event(Mouse.Button1Up, function() if gTable.Active then if Resizing and onResize then onResize(UDim2.new(Drag.Size.X.Scale, Drag.Size.X.Offset, Main.Size.Y.Scale, Main.Size.Y.Offset)) end Resizing = nil Mouse.Icon = curIcon --if Walls then -- wallPosition() --end end end)--]] else LeftSizeIcon.Visible = false RightSizeIcon.Visible = false end Close.MouseButton1Down:Connect(doClose) Hide.MouseButton1Down:Connect(function() doHide() end) gTable.CustomDestroy = function() service.UnWrap(GUI):Destroy() if client.Variables.MouseLockedBy == gTable then Mouse.Icon = curIcon client.Variables.MouseLockedBy = nil end if not isClosed then isClosed = true if onClose then onClose() end end end for i,child in next,GUI:GetChildren() do if child.Name ~= "Desc" and child.Name ~= "Drag" then specialInsts[child.Name] = child child.Parent = nil end end --// Drag & DisplayOrder Handler do local windowValue = Instance.new("BoolValue", GUI) local dragDragging = false local dragOffset local inFrame windowValue.Name = "__ADONIS_WINDOW" Event(Main.InputBegan, function(input) if gTable.Active and (input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch) then BringToFront() end end) Event(Drag.InputBegan, function(input) if gTable.Active then inFrame = true if (input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch) then BringToFront() end end end) Event(Drag.InputChanged, function(input) if gTable.Active then inFrame = true end end) Event(Drag.InputEnded, function(input) inFrame = false end) Event(InputService.InputBegan, function(input) if inFrame and GUI.DisplayOrder == 101 and not dragDragging and (input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch) then--isInFrame(input.Position.X, input.Position.Y, object) then dragDragging = true BringToFront() dragOffset = Vector2.new(Drag.AbsolutePosition.X - input.Position.X, Drag.AbsolutePosition.Y - input.Position.Y) end end) Event(InputService.InputChanged, function(input) if dragDragging and (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then Drag.Position = UDim2.new(0, dragOffset.X + input.Position.X, 0, dragOffset.Y + input.Position.Y) end end) Event(InputService.InputEnded, function(input) if (input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch) then dragDragging = false end end) end --// Finishing up local api = apiIfy(ScrollFrame, data) local meta = api:GetMetatable() local oldNewIndex = meta.__newindex local oldIndex = meta.__index create("ScrollingFrame", nil, ScrollFrame) LoadChildren(api, Content) api:SetSpecial("gTable", gTable) api:SetSpecial("Window", GUI) api:SetSpecial("Main", Main) api:SetSpecial("Title", Titlef) api:SetSpecial("Dragger", Drag) api:SetSpecial("Destroy", doClose) api:SetSpecial("Close", doClose) api:SetSpecial("Object", ScrollFrame) api:SetSpecial("Refresh", DoRefresh) api:SetSpecial("AddTitleButton", function(ignore, data) if type(ignore) == "table" and not data then data = ignore end return addTitleButton(data) end) api:SetSpecial("Ready", function() if onReady then onReady() end gTable.Ready() BringToFront() end) api:SetSpecial("BindEvent", function(ignore, ...) Event(...) end) api:SetSpecial("Hide", function(ignore, hide) doHide(hide) end) api:SetSpecial("SetTitle", function(ignore, newTitle) Titlef.Text = newTitle end) api:SetSpecial("SetPosition", function(ignore, newPos) setPosition(newPos) end) api:SetSpecial("SetSize", function(ignore, newSize) setSize(newSize) end) api:SetSpecial("GetPosition", function() return Drag.AbsolutePosition end) api:SetSpecial("GetSize", function() return Main.AbsoluteSize end) api:SetSpecial("IsVisible", isVisible) api:SetSpecial("IsClosed", isClosed) meta.__index = function(tab, ind) if ind == "IsVisible" then return isVisible() elseif ind == "Closed" then return isClosed else return oldIndex(tab, ind) end end setSize(Size) setPosition(Position) if Ready then gTable:Ready() BringToFront() end return api,GUI end
--SETTINGS
local TITLE1 = "Close Door" local TITLE2 = "Open Door" local IsOpen = false click.Triggered:Connect(function() if IsOpen == false then IsOpen = true click.ActionText = TITLE1 open_mus:Play() base2.Window.Transparency = 0.6 base2.Visual.Transparency = 0 base1.Window.Transparency = 1 base1.Visual.Transparency = 1 base2.CanCollide = true base1.CanCollide = false else IsOpen = false click.ActionText = TITLE2 close_mus:Play() base2.Window.Transparency = 1 base2.Visual.Transparency = 1 base1.Window.Transparency = 0.6 base1.Visual.Transparency = 0 base2.CanCollide = false base1.CanCollide = true end end)
-- Place script in StarterGui
local StarterGui = game:GetService('StarterGui') StarterGui:SetCore("ResetButtonCallback", false)
-- Decompiled with the Synapse X Luau decompiler.
local v1 = {}; v1.__index = v1; function v1.new() local v2 = {}; setmetatable(v2, v1); v2.flag = 0; v2.lastTime = 0; return v2; end; function v1.check(p1, p2, p3) if os.clock() - p1.lastTime < (p3 and 1) then if p2 <= p1.flag then p1.lastTime = os.clock(); return false; end; p1.flag = p1.flag + 1; else p1.flag = 0; end; p1.lastTime = os.clock(); return true; end; function v1.destroy(p4) p4.flag = nil; p4.lastTime = nil; end; function v1.Destroy(p5) return p5:destroy(); end; return v1;
-- This is a bit long --
script.Parent.MouseButton1Click:Connect(function() if script.Parent.Parent.FOV.Text == "120" then game.Workspace.CurrentCamera.FieldOfView = 120 end end) script.Parent.MouseButton1Click:Connect(function() if script.Parent.Parent.FOV.Text == "119" then game.Workspace.CurrentCamera.FieldOfView = 119 end end) script.Parent.MouseButton1Click:Connect(function() if script.Parent.Parent.FOV.Text == "118" then game.Workspace.CurrentCamera.FieldOfView = 118 end end) script.Parent.MouseButton1Click:Connect(function() if script.Parent.Parent.FOV.Text == "117" then game.Workspace.CurrentCamera.FieldOfView = 117 end end) script.Parent.MouseButton1Click:Connect(function() if script.Parent.Parent.FOV.Text == "116" then game.Workspace.CurrentCamera.FieldOfView = 116 end end) script.Parent.MouseButton1Click:Connect(function() if script.Parent.Parent.FOV.Text == "115" then game.Workspace.CurrentCamera.FieldOfView = 115 end end) script.Parent.MouseButton1Click:Connect(function() if script.Parent.Parent.FOV.Text == "114" then game.Workspace.CurrentCamera.FieldOfView = 114 end end) script.Parent.MouseButton1Click:Connect(function() if script.Parent.Parent.FOV.Text == "113" then game.Workspace.CurrentCamera.FieldOfView = 113 end end) script.Parent.MouseButton1Click:Connect(function() if script.Parent.Parent.FOV.Text == "112" then game.Workspace.CurrentCamera.FieldOfView = 112 end end) script.Parent.MouseButton1Click:Connect(function() if script.Parent.Parent.FOV.Text == "111" then game.Workspace.CurrentCamera.FieldOfView = 111 end end) script.Parent.MouseButton1Click:Connect(function() if script.Parent.Parent.FOV.Text == "110" then game.Workspace.CurrentCamera.FieldOfView = 110 end end) script.Parent.MouseButton1Click:Connect(function() if script.Parent.Parent.FOV.Text == "109" then game.Workspace.CurrentCamera.FieldOfView = 109 end end) script.Parent.MouseButton1Click:Connect(function() if script.Parent.Parent.FOV.Text == "108" then game.Workspace.CurrentCamera.FieldOfView = 108 end end) script.Parent.MouseButton1Click:Connect(function() if script.Parent.Parent.FOV.Text == "107" then game.Workspace.CurrentCamera.FieldOfView = 107 end end) script.Parent.MouseButton1Click:Connect(function() if script.Parent.Parent.FOV.Text == "106" then game.Workspace.CurrentCamera.FieldOfView = 106 end end) script.Parent.MouseButton1Click:Connect(function() if script.Parent.Parent.FOV.Text == "105" then game.Workspace.CurrentCamera.FieldOfView = 105 end end) script.Parent.MouseButton1Click:Connect(function() if script.Parent.Parent.FOV.Text == "104" then game.Workspace.CurrentCamera.FieldOfView = 104 end end) script.Parent.MouseButton1Click:Connect(function() if script.Parent.Parent.FOV.Text == "103" then game.Workspace.CurrentCamera.FieldOfView = 103 end end) script.Parent.MouseButton1Click:Connect(function() if script.Parent.Parent.FOV.Text == "102" then game.Workspace.CurrentCamera.FieldOfView = 102 end end) script.Parent.MouseButton1Click:Connect(function() if script.Parent.Parent.FOV.Text == "101" then game.Workspace.CurrentCamera.FieldOfView = 101 end end) script.Parent.MouseButton1Click:Connect(function() if script.Parent.Parent.FOV.Text == "100" then game.Workspace.CurrentCamera.FieldOfView = 100 end end) script.Parent.MouseButton1Click:Connect(function() if script.Parent.Parent.FOV.Text == "99" then game.Workspace.CurrentCamera.FieldOfView = 99 end end) script.Parent.MouseButton1Click:Connect(function() if script.Parent.Parent.FOV.Text == "98" then game.Workspace.CurrentCamera.FieldOfView = 98 end end) script.Parent.MouseButton1Click:Connect(function() if script.Parent.Parent.FOV.Text == "97" then game.Workspace.CurrentCamera.FieldOfView = 97 end end) script.Parent.MouseButton1Click:Connect(function() if script.Parent.Parent.FOV.Text == "96" then game.Workspace.CurrentCamera.FieldOfView = 96 end end) script.Parent.MouseButton1Click:Connect(function() if script.Parent.Parent.FOV.Text == "95" then game.Workspace.CurrentCamera.FieldOfView = 95 end end) script.Parent.MouseButton1Click:Connect(function() if script.Parent.Parent.FOV.Text == "94" then game.Workspace.CurrentCamera.FieldOfView = 94 end end) script.Parent.MouseButton1Click:Connect(function() if script.Parent.Parent.FOV.Text == "93" then game.Workspace.CurrentCamera.FieldOfView = 93 end end) script.Parent.MouseButton1Click:Connect(function() if script.Parent.Parent.FOV.Text == "92" then game.Workspace.CurrentCamera.FieldOfView = 92 end end) script.Parent.MouseButton1Click:Connect(function() if script.Parent.Parent.FOV.Text == "91" then game.Workspace.CurrentCamera.FieldOfView = 91 end end) script.Parent.MouseButton1Click:Connect(function() if script.Parent.Parent.FOV.Text == "90" then game.Workspace.CurrentCamera.FieldOfView = 90 end end) script.Parent.MouseButton1Click:Connect(function() if script.Parent.Parent.FOV.Text == "89" then game.Workspace.CurrentCamera.FieldOfView = 89 end end) script.Parent.MouseButton1Click:Connect(function() if script.Parent.Parent.FOV.Text == "88" then game.Workspace.CurrentCamera.FieldOfView = 88 end end) script.Parent.MouseButton1Click:Connect(function() if script.Parent.Parent.FOV.Text == "87" then game.Workspace.CurrentCamera.FieldOfView = 87 end end) script.Parent.MouseButton1Click:Connect(function() if script.Parent.Parent.FOV.Text == "86" then game.Workspace.CurrentCamera.FieldOfView = 86 end end) script.Parent.MouseButton1Click:Connect(function() if script.Parent.Parent.FOV.Text == "85" then game.Workspace.CurrentCamera.FieldOfView = 85 end end) script.Parent.MouseButton1Click:Connect(function() if script.Parent.Parent.FOV.Text == "84" then game.Workspace.CurrentCamera.FieldOfView = 84 end end) script.Parent.MouseButton1Click:Connect(function() if script.Parent.Parent.FOV.Text == "83" then game.Workspace.CurrentCamera.FieldOfView = 83 end end) script.Parent.MouseButton1Click:Connect(function() if script.Parent.Parent.FOV.Text == "82" then game.Workspace.CurrentCamera.FieldOfView = 82 end end) script.Parent.MouseButton1Click:Connect(function() if script.Parent.Parent.FOV.Text == "81" then game.Workspace.CurrentCamera.FieldOfView = 81 end end) script.Parent.MouseButton1Click:Connect(function() if script.Parent.Parent.FOV.Text == "80" then game.Workspace.CurrentCamera.FieldOfView = 80 end end) script.Parent.MouseButton1Click:Connect(function() if script.Parent.Parent.FOV.Text == "79" then game.Workspace.CurrentCamera.FieldOfView = 79 end end) script.Parent.MouseButton1Click:Connect(function() if script.Parent.Parent.FOV.Text == "78" then game.Workspace.CurrentCamera.FieldOfView = 78 end end) script.Parent.MouseButton1Click:Connect(function() if script.Parent.Parent.FOV.Text == "77" then game.Workspace.CurrentCamera.FieldOfView = 77 end end) script.Parent.MouseButton1Click:Connect(function() if script.Parent.Parent.FOV.Text == "76" then game.Workspace.CurrentCamera.FieldOfView = 76 end end) script.Parent.MouseButton1Click:Connect(function() if script.Parent.Parent.FOV.Text == "75" then game.Workspace.CurrentCamera.FieldOfView = 75 end end) script.Parent.MouseButton1Click:Connect(function() if script.Parent.Parent.FOV.Text == "74" then game.Workspace.CurrentCamera.FieldOfView = 74 end end) script.Parent.MouseButton1Click:Connect(function() if script.Parent.Parent.FOV.Text == "73" then game.Workspace.CurrentCamera.FieldOfView = 73 end end) script.Parent.MouseButton1Click:Connect(function() if script.Parent.Parent.FOV.Text == "72" then game.Workspace.CurrentCamera.FieldOfView = 72 end end) script.Parent.MouseButton1Click:Connect(function() if script.Parent.Parent.FOV.Text == "71" then game.Workspace.CurrentCamera.FieldOfView = 71 end end) script.Parent.MouseButton1Click:Connect(function() if script.Parent.Parent.FOV.Text == "70" then game.Workspace.CurrentCamera.FieldOfView = 70 end end)
-- Note: Overrides base class GetIsJumping with get-and-clear behavior to do a single jump -- rather than sustained jumping. This is only to preserve the current behavior through the refactor.
function DynamicThumbstick:GetIsJumping() local wasJumping = self.isJumping self.isJumping = false return wasJumping end function DynamicThumbstick:EnableAutoJump(enable) local humanoid = Players.LocalPlayer.Character and Players.LocalPlayer.Character:FindFirstChildOfClass("Humanoid") if humanoid then if enable then self.shouldRevertAutoJumpOnDisable = (humanoid.AutoJumpEnabled == false) and (Players.LocalPlayer.DevTouchMovementMode == Enum.DevTouchMovementMode.UserChoice) humanoid.AutoJumpEnabled = true elseif self.shouldRevertAutoJumpOnDisable then humanoid.AutoJumpEnabled = false end end end function DynamicThumbstick:Enable(enable, uiParentFrame) if enable == nil then return false end -- If nil, return false (invalid argument) enable = enable and true or false -- Force anything non-nil to boolean before comparison if self.enabled == enable then return true end -- If no state change, return true indicating already in requested state if enable then -- Enable if not self.thumbstickFrame then self:Create(uiParentFrame) end self:BindContextActions() if Players.LocalPlayer.Character then self:OnCharacterAdded(Players.LocalPlayer.Character) else Players.LocalPlayer.CharacterAdded:Connect(function(char) self:OnCharacterAdded(char) end) end else ContextActionService:UnbindAction(DYNAMIC_THUMBSTICK_ACTION_NAME) -- Disable self:OnInputEnded() -- Cleanup end self.enabled = enable self.thumbstickFrame.Visible = enable end function DynamicThumbstick:OnCharacterAdded(char) for _, child in ipairs(char:GetChildren()) do if child:IsA("Tool") then self.toolEquipped = child end end char.ChildAdded:Connect(function(child) if child:IsA("Tool") then self.toolEquipped = child elseif child:IsA("Humanoid") then self:EnableAutoJump(true) end end) char.ChildRemoved:Connect(function(child) if child == self.toolEquipped then self.toolEquipped = nil end end) self.humanoid = char:FindFirstChildOfClass("Humanoid") if self.humanoid then self:EnableAutoJump(true) end end
-- functions
function stopAllAnimations() local oldAnim = currentAnim -- return to idle if finishing an emote if (emoteNames[oldAnim] ~= nil and emoteNames[oldAnim] == false) then oldAnim = "idle" end if currentlyPlayingEmote then oldAnim = "idle" currentlyPlayingEmote = false end currentAnim = "" currentAnimInstance = nil if (currentAnimKeyframeHandler ~= nil) then currentAnimKeyframeHandler:disconnect() end if (currentAnimTrack ~= nil) then currentAnimTrack:Stop() currentAnimTrack:Destroy() currentAnimTrack = nil end -- clean up walk if there is one if (runAnimKeyframeHandler ~= nil) then runAnimKeyframeHandler:disconnect() end if (runAnimTrack ~= nil) then runAnimTrack:Stop() runAnimTrack:Destroy() runAnimTrack = nil end return oldAnim end function getHeightScale() if Humanoid then if not Humanoid.AutomaticScalingEnabled then return 1 end local scale = Humanoid.HipHeight / HumanoidHipHeight if AnimationSpeedDampeningObject == nil then AnimationSpeedDampeningObject = script:FindFirstChild("ScaleDampeningPercent") end if AnimationSpeedDampeningObject ~= nil then scale = 1 + (Humanoid.HipHeight - HumanoidHipHeight) * AnimationSpeedDampeningObject.Value / HumanoidHipHeight end return scale end return 1 end local function rootMotionCompensation(speed) local speedScaled = speed * 1.25 local heightScale = getHeightScale() local runSpeed = speedScaled / heightScale return runSpeed end local function setRunSpeed(speed) local ActualSpeed = speed * 1.25 / getHeightScale() if ActualSpeed ~= currentAnimSpeed then if ActualSpeed < 0.33 then currentAnimTrack:AdjustWeight(1) runAnimTrack:AdjustWeight(0.0001) elseif ActualSpeed < 0.66 then local Weight = (ActualSpeed - 0.33) / 0.33 currentAnimTrack:AdjustWeight(1 - Weight + 0.0001) runAnimTrack:AdjustWeight(Weight + 0.0001) else currentAnimTrack:AdjustWeight(0.0001) runAnimTrack:AdjustWeight(1) end currentAnimSpeed = ActualSpeed runAnimTrack:AdjustSpeed(ActualSpeed) currentAnimTrack:AdjustSpeed(ActualSpeed) end end function setAnimationSpeed(speed) if currentAnim == "walk" then setRunSpeed(speed) else if speed ~= currentAnimSpeed then currentAnimSpeed = speed currentAnimTrack:AdjustSpeed(currentAnimSpeed) end end end function keyFrameReachedFunc(frameName) if (frameName == "End") then if currentAnim == "walk" then if userNoUpdateOnLoop == true then if runAnimTrack.Looped ~= true then runAnimTrack.TimePosition = 0.0 end if currentAnimTrack.Looped ~= true then currentAnimTrack.TimePosition = 0.0 end else runAnimTrack.TimePosition = 0.0 currentAnimTrack.TimePosition = 0.0 end else local repeatAnim = currentAnim -- return to idle if finishing an emote if (emoteNames[repeatAnim] ~= nil and emoteNames[repeatAnim] == false) then repeatAnim = "idle" end if currentlyPlayingEmote then if currentAnimTrack.Looped then -- Allow the emote to loop return end repeatAnim = "idle" currentlyPlayingEmote = false end local animSpeed = currentAnimSpeed playAnimation(repeatAnim, 0.15, Humanoid) setAnimationSpeed(animSpeed) end end end function rollAnimation(animName) local roll = math.random(1, animTable[animName].totalWeight) local origRoll = roll local idx = 1 while (roll > animTable[animName][idx].weight) do roll = roll - animTable[animName][idx].weight idx = idx + 1 end return idx end local function switchToAnim(anim, animName, transitionTime, humanoid) -- switch animation if (anim ~= currentAnimInstance) then if (currentAnimTrack ~= nil) then currentAnimTrack:Stop(transitionTime) currentAnimTrack:Destroy() end if (runAnimTrack ~= nil) then runAnimTrack:Stop(transitionTime) runAnimTrack:Destroy() if userNoUpdateOnLoop == true then runAnimTrack = nil end end currentAnimSpeed = 1.0 -- load it to the humanoid; get AnimationTrack currentAnimTrack = humanoid:LoadAnimation(anim) currentAnimTrack.Priority = Enum.AnimationPriority.Core -- play the animation currentAnimTrack:Play(transitionTime) currentAnim = animName currentAnimInstance = anim -- set up keyframe name triggers if (currentAnimKeyframeHandler ~= nil) then currentAnimKeyframeHandler:disconnect() end currentAnimKeyframeHandler = currentAnimTrack.KeyframeReached:connect(keyFrameReachedFunc) -- check to see if we need to blend a walk/run animation if animName == "walk" then local runAnimName = "run" local runIdx = rollAnimation(runAnimName) runAnimTrack = humanoid:LoadAnimation(animTable[runAnimName][runIdx].anim) runAnimTrack.Priority = Enum.AnimationPriority.Core runAnimTrack:Play(transitionTime) if (runAnimKeyframeHandler ~= nil) then runAnimKeyframeHandler:disconnect() end runAnimKeyframeHandler = runAnimTrack.KeyframeReached:connect(keyFrameReachedFunc) end end end function playAnimation(animName, transitionTime, humanoid) local idx = rollAnimation(animName) local anim = animTable[animName][idx].anim switchToAnim(anim, animName, transitionTime, humanoid) currentlyPlayingEmote = false end function playEmote(emoteAnim, transitionTime, humanoid) switchToAnim(emoteAnim, emoteAnim.Name, transitionTime, humanoid) currentlyPlayingEmote = true end
--Event
ClickDetector.MouseClick:Connect(function() if ClickReady.Value == true then ClickReady.Value = false ButtonClick:Play() Button.Size = Size1 Button.Material = Material1 DigitNumber.Value = DigitNumber.Value + 1 if DigitNumber.Value > Max then DigitNumber.Value = Min end NumberGUI.Text = DigitNumber.Value EnteredCode.Value = tostring(Digit1.Value)..""..tostring(Digit2.Value)..""..tostring(Digit3.Value) wait(.5) Button.Size = Size0 Button.Material = Material0 wait(.25) ClickReady.Value = true end end)
--I, Maelstronomer, did not make these scripts, but only took bits and pieces from other scripts and put them together. --I have no idea who were the original makers of these scripts, as everyone seems to have taken credit from them. --So yeah, that's the creditless credits for you. Just don't take this as your own, because, well, it isn't. --If you do, then whatever helps you sleep at night...
--!strict --[=[ @function values @within Dictionary @param dictionary {[K]: V} -- The dictionary to get the values from. @return {V} -- The values in the dictionary. Gets the values in the given dictionary. ```lua local dictionary = { hello = "roblox", goodbye = "world" } local values = Values(dictionary) -- { "roblox", "world" } ``` ]=]
local function values<K, V>(dictionary: { [K]: V }): { V } local result = {} for _, value in pairs(dictionary) do table.insert(result, value) end return result end return values
--local Music = game.Workspace.Music
local GrabSFX = game.Workspace.GrabSFX script.Parent.Touched:Connect(function(hit) if hit then --Music.Volume = 0 GrabSFX:Play() --hit.Parent.PlayerScript.Disabled = true hit.Parent.Humanoid.WalkSpeed = 0 hit.Parent.Humanoid.JumpPower = 0 local AnimationTracks = hit.Parent.Humanoid:GetPlayingAnimationTracks() for i, track in pairs (AnimationTracks) do track:Stop() end local StarAnim = hit.Parent.Humanoid:LoadAnimation(hit.Parent.StarGet) StarAnim:Play() script.Parent.Parent = game.ReplicatedStorage end end) Popup = script.Parent.TrophyGrab Ready = true function onTouch(hit) local h = hit.Parent:FindFirstChild("Humanoid") if h ~= nil and Ready == true then Ready = false local plyr = game.Players:FindFirstChild(h.Parent.Name) local c = Popup:clone() c.Script.Disabled = false c.Parent = plyr.PlayerGui end end script.Parent.Touched:connect(onTouch)
-- Services
local ReplicatedStorage = game:GetService("ReplicatedStorage") local ReplicatedFirst = game:GetService("ReplicatedFirst") local TeleportService = game:GetService("TeleportService") local Players = game:GetService("Players")
-- Decompiled with the Synapse X Luau decompiler.
return function(p1, p2) for v1, v2 in pairs(p1) do if v2 == p2 then return v1; end; end; end;
-- events
UserInputService.InputBegan:connect(function(inputObject, processed) local action = ActionFromInputObject(inputObject) if action then actionBegan:Fire(action, processed) end end) UserInputService.InputEnded:connect(function(inputObject, processed) local action = ActionFromInputObject(inputObject) if action then actionEnded:Fire(action, processed) end end)
----- Script -----
Button.Activated:Connect(function() Events.BatEvent:FireServer() Frame.Visible = false end)
-- Return the mock or actual service depending on environment:
if shouldUseMock then warn("INFO: Using MockDataStoreService instead of DataStoreService") return require(MockDataStoreServiceModule) else return game:GetService("DataStoreService") end
-- Now with exciting TeamColors HACK! --[[script.Parent:WaitForChild("Torso") script.Parent:WaitForChild("HumanoidRootPart") script.Parent:WaitForChild("Right Leg") script.Parent:WaitForChild("Left Leg") script.Parent:WaitForChild("Left Arm") script.Parent:WaitForChild("Right Arm") script.Parent:WaitForChild("Head") local sp = script.Parent local torso = script.Parent.Torso local nName = "Neck" local n = Instance.new("Motor6D") n.Name = nName n.Part0 = torso n.Part1 = sp["Head"] n.C0 = script[nName].C0 n.C1 = script[nName].C1 n.MaxVelocity = 0.1 local nOld = torso:FindFirstChild(nName) n.Parent = torso if nOld ~= nil then nOld:Destroy() end local jName = "RootJoint" local j = Instance.new("Motor6D") j.Name = jName j.Part0 = sp.HumanoidRootPart j.Part1 = sp["Torso"] j.C0 = script[jName].C0 j.C1 = script[jName].C1 j.MaxVelocity = 0.1 local jOld = sp.HumanoidRootPart:FindFirstChild(jName) j.Parent = sp.HumanoidRootPart if jOld ~= nil then jOld:Destroy() end local rsName = "Right Shoulder" local rs = Instance.new("Motor6D") rs.Name = rsName rs.Part0 = torso rs.Part1 = sp["Right Arm"] rs.C0 = script[rsName].C0 rs.C1 = script[rsName].C1 rs.MaxVelocity = 0.1 local rsOld = torso:FindFirstChild(rsName) rs.Parent = torso if rsOld ~= nil then rsOld:Destroy() end local lsName = "Left Shoulder" local ls = Instance.new("Motor6D") ls.Name = lsName ls.Part0 = torso ls.Part1 = sp["Left Arm"] ls.C0 = script[lsName].C0 ls.C1 = script[lsName].C1 ls.MaxVelocity = 0.1 local lsOld = torso:FindFirstChild(lsName) ls.Parent = torso if lsOld ~= nil then lsOld:Destroy() end local rhName = "Right Hip" local rh = Instance.new("Motor6D") rh.Name = rhName rh.Part0 = torso rh.Part1 = sp["Right Leg"] rh.C0 = script[rhName].C0 rh.C1 = script[rhName].C1 rh.MaxVelocity = 0.1 local rhOld = torso:FindFirstChild(rhName) rh.Parent = torso if rhOld ~= nil then rhOld:Destroy() end RightHip = rh local lhName = "Left Hip" local lh = Instance.new("Motor6D") lh.Name = lhName lh.Part0 = torso lh.Part1 = sp["Left Leg"] lh.C0 = script[lhName].C0 lh.C1 = script[lhName].C1 lh.MaxVelocity = 0.1 local lhOld = torso:FindFirstChild(lhName) lh.Parent = torso if lhOld ~= nil then lhOld:Destroy() end local LeftHip = lh script.Parent.Head:MakeJoints() ]]
function waitForChild(parent, childName) while true do local child = parent:findFirstChild(childName) if child then return child end parent.ChildAdded:wait() end end
---[[ Message Settings ]]
module.MaximumMessageLength = 400 module.DisallowedWhiteSpace = {"\n", "\r", "\t", "\v", "\f"} module.ClickOnPlayerNameToWhisper = true module.ClickOnChannelNameToSetMainChannel = true module.BubbleChatMessageTypes = {ChatConstants.MessageTypeDefault, ChatConstants.MessageTypeWhisper}
--Camera bobbing -- Shakes the camera when the player is walking
local runService = game:GetService("RunService") local character = script.Parent local humanoid = character:WaitForChild("Humanoid") function updateBobbleEffect() local currentTime = tick() if humanoid.MoveDirection.Magnitude > 0 then local bobbleX = math.cos(currentTime * 10) * .25 local bobbleY = math.abs(math.sin(currentTime * 10)) * .25 local bobble = Vector3.new(bobbleX, bobbleY, 0) humanoid.CameraOffset = humanoid.CameraOffset:lerp(bobble, .25) else humanoid.CameraOffset = humanoid.CameraOffset * .75 end end runService.RenderStepped:Connect(updateBobbleEffect)
--[[ enumList = EnumList.new(name: string, enums: string[]) enumList:Is(item) Example: direction = EnumList.new("Direction", {"Up", "Down", "Left", "Right"}) leftDir = direction.Left print("IsDirection", direction:Is(leftDir)) --]]
type EnumNames = {string} local Symbol = require(script.Parent.Symbol) local EnumList = {} function EnumList.new(name: string, enums: EnumNames) local scope = Symbol.new(name, nil) local enumItems: {[string]: Symbol.Symbol} = {} for _,enumName in ipairs(enums) do enumItems[enumName] = Symbol.new(enumName, scope) end local self = setmetatable({ _scope = scope; }, { __index = function(_t, k) if enumItems[k] then return enumItems[k] elseif EnumList[k] then return EnumList[k] else error("Unknown " .. name .. ": " .. tostring(k), 2) end end; __newindex = function() error("Cannot add new " .. name, 2) end; }) return self end function EnumList:Is(obj: any): boolean return Symbol.IsInScope(obj, self._scope) end export type EnumList = typeof(EnumList.new("", {""})) return EnumList
--[[ Constants ]]
-- local ZERO_VECTOR3 = Vector3.new(0,0,0) local TOUCH_CONTROLS_SHEET = "rbxasset://textures/ui/Input/TouchControlsSheetV2.png" local MIDDLE_TRANSPARENCIES = { 1 - 0.89, 1 - 0.70, 1 - 0.60, 1 - 0.50, 1 - 0.40, 1 - 0.30, 1 - 0.25 } local NUM_MIDDLE_IMAGES = #MIDDLE_TRANSPARENCIES local FADE_IN_OUT_BACKGROUND = true local FADE_IN_OUT_MAX_ALPHA = 0.35 local FADE_IN_OUT_HALF_DURATION_DEFAULT = 0.3 local FADE_IN_OUT_BALANCE_DEFAULT = 0.5 local ThumbstickFadeTweenInfo = TweenInfo.new(0.15, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut) local Players = game:GetService("Players") local GuiService = game:GetService("GuiService") local UserInputService = game:GetService("UserInputService") local RunService = game:GetService("RunService") local TweenService = game:GetService("TweenService")
-- Helper functions
local function loadAnimation(controller, animationId) animation.AnimationId = "rbxassetid://" .. animationId return controller:LoadAnimation(animation) end local function isolateAndDampenYAngle(targetCFrame, proportionMultiplier) proportionMultiplier = proportionMultiplier or 1 local _, y = targetCFrame:ToEulerAnglesXYZ() return CFrame.new(targetCFrame.Position) * CFrame.Angles( 0, y * proportionMultiplier, 0 ) end local function makeNPCLookAt(lookAtPosition) -- If the streaming is enabled then NPC might be streamed out which in that case this function should return immediately. if not npcModel:IsDescendantOf(workspace) then return end if not lookAtPosition then return end local differenceVector = lookAtPosition - npcModel.PrimaryPart.Position local targetCFrame = rotationOffset * CFrame.new(Vector3.new(), differenceVector.Unit) or rotationOffset -- Let the waving animation move the body if not waveAnimationTrack.IsPlaying then NPC.Root.Transform = isolateAndDampenYAngle(targetCFrame, TwistProportions.Root) NPC.Waist.Transform = isolateAndDampenYAngle(targetCFrame, TwistProportions.Waist) end NPC.Neck.Transform = isolateAndDampenYAngle(targetCFrame, waveAnimationTrack.IsPlaying and TwistProportions.Full or TwistProportions.Neck) return differenceVector.Magnitude end
--// Set cam
repeat wait() cam.CameraType = Enum.CameraType.Scriptable until cam.CameraType == Enum.CameraType.Scriptable
-- initialize to idle
playAnimation("idle", 0.1, Humanoid) pose = "Standing" while Figure.Parent ~= nil do local time = task.wait() move(time) end
--// Functions
function MakeFakeArms() Arms = Instance.new("Model") Arms.Name = "Arms" Arms.Parent = L_5_ local L_175_ = Instance.new("Humanoid") L_175_.MaxHealth = 0 L_175_.Health = 0 L_175_.Name = "" L_175_.Parent = Arms if L_3_:FindFirstChild("Shirt") then local L_180_ = L_3_:FindFirstChild("Shirt"):clone() L_180_.Parent = Arms end local L_176_ = L_3_:FindFirstChild("Right Arm"):clone() for L_181_forvar1, L_182_forvar2 in pairs(L_176_:GetChildren()) do if L_182_forvar2:IsA('Motor6D') then L_182_forvar2:Destroy() end end L_176_.Name = "Right Arm" L_176_.FormFactor = "Custom" L_176_.Size = Vector3.new(0.8, 2.5, 0.8) L_176_.Transparency = 0.0 local L_177_ = Instance.new("Motor6D") L_177_.Part0 = L_176_ L_177_.Part1 = L_3_:FindFirstChild("Right Arm") L_177_.C0 = CFrame.new() L_177_.C1 = CFrame.new() L_177_.Parent = L_176_ L_176_.Parent = Arms local L_178_ = L_3_:FindFirstChild("Left Arm"):clone() L_178_.Name = "Left Arm" L_178_.FormFactor = "Custom" L_178_.Size = Vector3.new(0.8, 2.5, 0.8) L_178_.Transparency = 0.0 local L_179_ = Instance.new("Motor6D") L_179_.Part0 = L_178_ L_179_.Part1 = L_3_:FindFirstChild("Left Arm") L_179_.C0 = CFrame.new() L_179_.C1 = CFrame.new() L_179_.Parent = L_178_ L_178_.Parent = Arms end function RemoveArmModel() if Arms then Arms:Destroy() Arms = nil end end local L_138_ function CreateShell() L_138_ = time() local L_183_ = L_1_.Shell:clone() if L_183_:FindFirstChild('Shell') then L_183_.Shell:Destroy() end L_183_.CFrame = L_1_.Chamber.CFrame L_183_.Velocity = L_1_.Chamber.CFrame.lookVector * 30 + Vector3.new(0, 4, 0) --shell.RotVelocity = Vector3.new(-10,40,30) L_183_.Parent = L_104_ L_183_.CanCollide = false game:GetService("Debris"):addItem(L_183_, 1) delay(0.5, function() if L_19_:FindFirstChild('ShellCasing') then local L_184_ = L_19_.ShellCasing:clone() L_184_.Parent = L_2_.PlayerGui L_184_:Play() game:GetService('Debris'):AddItem(L_184_, L_184_.TimeLength) end end) end
--Settings
local blood_destroy_delay = 10 local blood_part_per_hit = 1
--Made by Luckymaxer
Tool = script.Parent Handle = Tool:WaitForChild("Handle") Players = game:GetService("Players") Debris = game:GetService("Debris") RunService = game:GetService("RunService") UserInputService = game:GetService("UserInputService") AmmoDisplay = script:WaitForChild("AmmoDisplay"):Clone() CastLaser = Tool:WaitForChild("CastLaser"):Clone() Camera = game:GetService("Workspace").CurrentCamera BaseUrl = "http://www.roblox.com/asset/?id=" AnimationTracks = {} LocalObjects = {} Animations = { Hold = {Animation = Tool:WaitForChild("Hold"), FadeTime = nil, Weight = nil, Speed = 1, Duration = 2}, Fire = {Animation = Tool:WaitForChild("Fire"), FadeTime = 0.25, Weight = nil, Speed = 0.5, Duration = 0.5}, Reload = {Animation = Tool:WaitForChild("Reload"), FadeTime = nil, Weight = nil, Speed = 1, Duration = 2}, } Sounds = { Reload = Handle:WaitForChild("Reload"), NoAmmo = Handle:WaitForChild("NoAmmo"), } Modules = Tool:WaitForChild("Modules") Functions = require(Modules:WaitForChild("Functions")) Remotes = Tool:WaitForChild("Remotes") ServerControl = Remotes:WaitForChild("ServerControl") ClientControl = Remotes:WaitForChild("ClientControl") ConfigurationBin = Tool:WaitForChild("Configuration") Configuration = {} Configuration = Functions.CreateConfiguration(ConfigurationBin, Configuration) InputCheck = Instance.new("ScreenGui") InputCheck.Name = "InputCheck" InputButton = Instance.new("ImageButton") InputButton.Name = "InputButton" InputButton.Image = "" InputButton.BackgroundTransparency = 1 InputButton.ImageTransparency = 1 InputButton.Size = UDim2.new(1, 0, 1, 0) InputButton.Parent = InputCheck Cursors = { Normal = (BaseUrl .. "170908665"), EnemyHit = (BaseUrl .. "172618259"), } Rate = (1 / 60) FiringOffset = Vector3.new(0, ((Handle.Size.Y / 4) - 0.2), -(Handle.Size.Z / 2)) Reloading = false MouseDown = false ToolEquipped = false Tool.Enabled = true function SetAnimation(mode, value) if mode == "PlayAnimation" and value and ToolEquipped and Humanoid then for i, v in pairs(AnimationTracks) do if v.Animation == value.Animation then v.AnimationTrack:Stop() table.remove(AnimationTracks, i) end end local AnimationTrack = Humanoid:LoadAnimation(value.Animation) table.insert(AnimationTracks, {Animation = value.Animation, AnimationTrack = AnimationTrack}) AnimationTrack:Play(value.FadeTime, value.Weight, value.Speed) elseif mode == "StopAnimation" and value then for i, v in pairs(AnimationTracks) do if v.Animation == value.Animation then v.AnimationTrack:Stop(value.FadeTime) table.remove(AnimationTracks, i) end end end end function ToggleGui() if not AmmoDisplayClone or not AmmoDisplayClone.Parent then return end local Frame = AmmoDisplayClone.Frame local Ammo = Frame.Ammo if Configuration.Ammo.ClipSize.MaxValue > 0 then Ammo.AmmoCounter.CounterPart.Text = Configuration.Ammo.ClipSize.Value end Ammo.MagCounter.CounterPart.Text = Configuration.Ammo.Magazines.Value end function Reload() if Reloading or not Tool.Enabled or Configuration.Ammo.Magazines.Value >= Configuration.Ammo.Magazines.MaxValue then return end Tool.Enabled = false Reloading = true ToggleGui() local CanReload = true if Configuration.Ammo.ClipSize.MaxValue > 0 and Configuration.Ammo.ClipSize.Value <= 0 then CanReload = false else CanReload = true end if CanReload then Spawn(function() local Animation = Animations.Reload OnClientInvoke("PlayAnimation", Animation) wait(Animation.Duration) OnClientInvoke("StopAnimation", Animation) end) Sounds.Reload:Play() local AddedClips = ((Configuration.Ammo.Magazines.MaxValue > 0 and (Configuration.Ammo.Magazines.MaxValue - Configuration.Ammo.Magazines.Value)) or Configuration.Ammo.ClipSize.MaxValue) if Configuration.Ammo.ClipSize.MaxValue > 0 then AddedClips = ((AddedClips > Configuration.Ammo.ClipSize.Value and Configuration.Ammo.ClipSize.Value) or AddedClips) end --[[local ReloadRate = (Configuration.ReloadTime.Value / Configuration.Ammo.Magazines.MaxValue) for i = 1, AddedClips do wait(ReloadTime) Configuration.Ammo.Magazines.Value = (Configuration.Ammo.Magazines.Value + 1) end]] wait(Configuration.ReloadTime.Value) Configuration.Ammo.Magazines.Value = (Configuration.Ammo.Magazines.Value + AddedClips) Configuration.Ammo.ClipSize.Value = (Configuration.Ammo.ClipSize.Value - AddedClips) Sounds.Reload:Stop() ToggleGui() end Reloading = false Tool.Enabled = true end function RayTouched(Hit, Position) if not Hit or not Hit.Parent then return end local character = Hit.Parent if character:IsA("Hat") then character = character.Parent end if character == Character then return end local humanoid = character:FindFirstChild("Humanoid") local SoundChosen = Sounds.RayHit if not humanoid or humanoid.Health == 0 then return end local player = Players:GetPlayerFromCharacter(character) if player and Functions.IsTeamMate(Player, player) then return end Spawn(function() IconChangeTick = tick() PlayerMouse.Icon = Cursors.EnemyHit wait(1) if (tick() - IconChangeTick) >= 0.95 and ToolEquipped and PlayerMouse then PlayerMouse.Icon = Cursors.Normal end end) end function FireRay(StartPosition, TargetPosition) local Direction = CFrame.new(StartPosition, TargetPosition).lookVector local RayHit, RayPos, RayNormal = Functions.CastRay(StartPosition, Direction, Configuration.Range.Value, {Character}, false) local Backpack = Player:FindFirstChild("Backpack") if Backpack then local LaserScript = CastLaser:Clone() local StartPos = Instance.new("Vector3Value") StartPos.Name = "StartPosition" StartPos.Value = StartPosition StartPos.Parent = LaserScript local TargetPos = Instance.new("Vector3Value") TargetPos.Name = "TargetPosition" TargetPos.Value = RayPos TargetPos.Parent = LaserScript local RayHit = Instance.new("BoolValue") RayHit.Name = "RayHit" RayHit.Value = RayHit RayHit.Parent = LaserScript LaserScript.Disabled = false LaserScript.Parent = Backpack end Spawn(function() InvokeServer("CastLaser", {StartPosition = StartPosition, TargetPosition = RayPos, RayHit = ((RayHit and true) or false)}) end) Spawn(function() InvokeServer("RayHit", {Hit = RayHit, Position = RayPos}) end) RayTouched(RayHit, RayPos) end function Button1Pressed(Down) if not Down and MouseDown then MouseDown = false end end function KeyPress(Key, Down) if Key == "r" and Down then Reload() end end function Activated() if not Tool.Enabled or not ToolEquipped or Reloading then return end Tool.Enabled = false if Configuration.Ammo.Magazines.Value > 0 then local FirstShot = false if Configuration.Automatic.Value then MouseDown = true end OnClientInvoke("StopAnimation", {Animation = Animations.Fire.Animation, FadeTime = nil}) OnClientInvoke("PlayAnimation", Animations.Fire) while MouseDown or not FirstShot and ToolEquipped and CheckIfAlive() do if Configuration.Ammo.Magazines.Value <= 0 or not ToolEquipped or not CheckIfAlive() then break end if not FirstShot then FirstShot = true end local BurstAmount = math.random(Configuration.Burst.Bullets.MinValue, Configuration.Burst.Bullets.MaxValue) local WithinFiringRange = false Spawn(function() InvokeServer("Fire", true) end) for i = 1, ((BurstAmount > 0 and BurstAmount) or 1) do local TargetPosition = OnClientInvoke("MousePosition") if not TargetPosition then break end TargetPosition = TargetPosition.Position local StartPosition = (Handle.CFrame * CFrame.new(FiringOffset.X, FiringOffset.Y, FiringOffset.Z)).p if BurstAmount > 0 then local Offset = (Configuration.Burst.Offset.Value * 100) TargetPosition = TargetPosition + Vector3.new((math.random(-Offset.X, Offset.X) * 0.01), (math.random(-Offset.Y, Offset.Y) * 0.01), (math.random(-Offset.Z, Offset.Z) * 0.01)) end local Accuracy = (Configuration.Accuracy.Value * 100) TargetPosition = TargetPosition + Vector3.new((math.random(-Accuracy.X, Accuracy.X) * 0.01), (math.random(-Accuracy.Y, Accuracy.Y) * 0.01), (math.random(-Accuracy.Z, Accuracy.Z) * 0.01)) Configuration.Ammo.Magazines.Value = (Configuration.Ammo.Magazines.Value - 1) FireRay(StartPosition, TargetPosition) end ToggleGui() wait(Configuration.FireRate.Value) end OnClientInvoke("StopAnimation", {Animation = Animations.Fire.Animation, FadeTime = 0.25}) else Tool.Enabled = true Sounds.NoAmmo:Play() Reload() end MouseDown = false Tool.Enabled = true if Configuration.Ammo.Magazines.Value <= 0 then Sounds.NoAmmo:Play() Reload() end end function CheckIfAlive() return (((Player and Player.Parent and Character and Character.Parent and Humanoid and Humanoid.Parent and Humanoid.Health > 0) and true) or false) end function Equipped(Mouse) Character = Tool.Parent Player = Players:GetPlayerFromCharacter(Character) Humanoid = Character:FindFirstChild("Humanoid") if not CheckIfAlive() then return end ToolEquipped = true Spawn(function() PlayerMouse = Player:GetMouse() Mouse.Button1Down:connect(function() Button1Pressed(true) end) Mouse.Button1Up:connect(function() Button1Pressed(false) end) Mouse.KeyDown:connect(function(Key) KeyPress(Key, true) end) Mouse.KeyUp:connect(function(Key) KeyPress(Key, false) end) Humanoid.CameraOffset = Vector3.new(0, 0.35, 0) OnClientInvoke("PlayAnimation", Animations.Hold) local PlayerGui = Player:FindFirstChild("PlayerGui") if PlayerGui then if UserInputService.TouchEnabled then InputCheckClone = InputCheck:Clone() InputCheckClone.InputButton.InputBegan:connect(function() InvokeServer("Button1Click", {Down = true}) end) InputCheckClone.InputButton.InputEnded:connect(function() InvokeServer("Button1Click", {Down = false}) end) InputCheckClone.Parent = PlayerGui end local function AdjustAmmoDisplay() local Frame = AmmoDisplayClone.Frame Frame.CurrentWeapon.Text = Configuration.ToolName.Value local Ammo = Frame.Ammo Ammo.AmmoCounter.CounterPart.Text = ((Configuration.Ammo.ClipSize.MaxValue > 0 and Configuration.Ammo.ClipSize.Value) or "--") Ammo.MagCounter.CounterPart.Text = Configuration.Ammo.Magazines.Value end AmmoDisplayClone = AmmoDisplay:Clone() AdjustAmmoDisplay() AmmoDisplayClone.Parent = PlayerGui ToggleGui() for i, v in pairs({ClipSizeChanged, MagazinesChanged}) do if v then v:disconnect() end end ClipSizeChanged = Configuration.Ammo.ClipSize.Changed:connect(function() AdjustAmmoDisplay() end) MagazinesChanged = Configuration.Ammo.Magazines.Changed:connect(function() AdjustAmmoDisplay() end) end for i, v in pairs({"Left Arm", "Right Arm"}) do local Arm = Character:FindFirstChild(v) if Arm then Spawn(function() OnClientInvoke("SetLocalTransparencyModifier", {Object = Arm, Transparency = 0, AutoUpdate = false}) end) end end Mouse.Icon = Cursors.Normal end) end function Unequipped() LocalObjects = {} if CheckIfAlive() then Humanoid.CameraOffset = Vector3.new(0, 0, 0) end for i, v in pairs(Sounds) do v:Stop() end if PlayerMouse then PlayerMouse.Icon = "" end for i, v in pairs({InputCheckClone, ObjectLocalTransparencyModifier, AmmoDisplayClone, ClipSizeChanged, MagazinesChanged}) do if tostring(v) == "Connection" then v:disconnect() elseif v and v.Parent then v:Destroy() end end MouseDown = false for i, v in pairs(AnimationTracks) do if v and v.AnimationTrack then v.AnimationTrack:Stop() end end AnimationTracks = {} ToolEquipped = false end function InvokeServer(mode, value) pcall(function() local ServerReturn = ServerControl:InvokeServer(mode, value) return ServerReturn end) end function OnClientInvoke(mode, value) if mode == "PlayAnimation" and value and ToolEquipped and Humanoid then SetAnimation("PlayAnimation", value) elseif mode == "StopAnimation" and value then SetAnimation("StopAnimation", value) elseif mode == "PlaySound" and value then value:Play() elseif mode == "StopSound" and value then value:Stop() elseif mode == "MousePosition" then return {Position = PlayerMouse.Hit.p, Target = PlayerMouse.Target} elseif mode == "SetLocalTransparencyModifier" and value and ToolEquipped then pcall(function() local ObjectFound = false for i, v in pairs(LocalObjects) do if v == value then ObjectFound = true end end if not ObjectFound then table.insert(LocalObjects, value) if ObjectLocalTransparencyModifier then ObjectLocalTransparencyModifier:disconnect() end ObjectLocalTransparencyModifier = RunService.RenderStepped:connect(function() for i, v in pairs(LocalObjects) do if v.Object and v.Object.Parent then local CurrentTransparency = v.Object.LocalTransparencyModifier if ((not v.AutoUpdate and (CurrentTransparency == 1 or CurrentTransparency == 0)) or v.AutoUpdate) then v.Object.LocalTransparencyModifier = v.Transparency end else table.remove(LocalObjects, i) end end end) end end) end end ClientControl.OnClientInvoke = OnClientInvoke Tool.Activated:connect(Activated) Tool.Equipped:connect(Equipped) Tool.Unequipped:connect(Unequipped)
---will call func when instance's parent is changed to nil
function UTIL.DefineDestructor(instance,func) instance.AncestryChanged:connect(function (child,parent) if child == instance and not parent then func() end end) end
--// Renders
local L_153_ L_98_:connect(function() if L_15_ then L_148_, L_149_ = L_148_ or 0, L_149_ or 0 if L_151_ == nil or L_150_ == nil then L_151_ = L_44_.C0 L_150_ = L_44_.C1 end local L_259_ = (math.sin(L_142_ * L_144_ / 2) * L_143_) local L_260_ = (math.sin(L_142_ * L_144_) * L_143_) local L_261_ = CFrame.new(L_259_, L_260_, 0.02) local L_262_ = (math.sin(L_138_ * L_141_ / 2) * L_140_) local L_263_ = (math.cos(L_138_ * L_141_) * L_140_) local L_264_ = CFrame.new(L_262_, L_263_, 0.02) if L_135_ then L_142_ = L_142_ + .017 if L_24_.WalkAnimEnabled == true then L_136_ = L_261_ else L_136_ = CFrame.new() end else L_142_ = 0 L_136_ = CFrame.new() end L_134_.t = Vector3.new(L_129_, L_130_, 0) local L_265_ = L_134_.p local L_266_ = L_265_.X / L_131_ * (L_60_ and L_133_ or L_132_) local L_267_ = L_265_.Y / L_131_ * (L_60_ and L_133_ or L_132_) L_5_.CFrame = L_5_.CFrame:lerp(L_5_.CFrame * L_137_, 0.2) if L_60_ then L_125_ = CFrame.Angles(math.rad(-L_266_), math.rad(L_266_), math.rad(L_267_)) * CFrame.fromAxisAngle(Vector3.new(5, 0, -1), math.rad(L_266_)) L_138_ = 0 L_139_ = CFrame.new() elseif not L_60_ then L_125_ = CFrame.Angles(math.rad(-L_267_), math.rad(-L_266_), math.rad(-L_266_)) * CFrame.fromAxisAngle(L_43_.Position, math.rad(-L_267_)) L_138_ = L_138_ + 0.017 L_139_ = L_264_ end if L_24_.SwayEnabled == true then L_44_.C0 = L_44_.C0:lerp(L_151_ * L_125_ * L_136_ * L_139_, 0.1) else L_44_.C0 = L_44_.C0:lerp(L_151_ * L_136_, 0.1) end if L_63_ and not L_66_ and L_68_ and not L_60_ and not L_62_ and not Shooting then L_44_.C1 = L_44_.C1:lerp(L_44_.C0 * L_24_.SprintPos, 0.1) elseif not L_63_ and not L_66_ and not L_68_ and not L_60_ and not L_62_ and not Shooting then L_44_.C1 = L_44_.C1:lerp(CFrame.new(), 0.1) end if L_60_ and not L_63_ then if not L_61_ then L_84_ = L_24_.AimCamRecoil L_83_ = L_24_.AimGunRecoil L_85_ = L_24_.AimKickback elseif L_61_ then if L_87_ == 1 then L_84_ = L_24_.AimCamRecoil / 1.5 L_83_ = L_24_.AimGunRecoil / 1.5 L_85_ = L_24_.AimKickback / 1.5 end if L_87_ == 2 then L_84_ = L_24_.AimCamRecoil / 2 L_83_ = L_24_.AimGunRecoil / 2 L_85_ = L_24_.AimKickback / 2 end end if (L_3_.Head.Position - L_5_.CoordinateFrame.p).magnitude < 2 then L_44_.C1 = L_44_.C1:lerp(L_44_.C0 * L_52_.CFrame:toObjectSpace(L_43_.CFrame), L_24_.AimSpeed) L_41_:WaitForChild('Sense'):WaitForChild('Sensitivity').Visible = true L_41_:WaitForChild('Sense'):WaitForChild('Sensitivity').Text = L_50_ L_99_.MouseDeltaSensitivity = L_50_ end elseif not L_60_ and not L_63_ and L_15_ then if (L_3_.Head.Position - L_5_.CoordinateFrame.p).magnitude < 2 then L_44_.C1 = L_44_.C1:lerp(CFrame.new(), L_24_.UnaimSpeed) L_41_:WaitForChild('Sense'):WaitForChild('Sensitivity').Visible = false L_41_:WaitForChild('Sense'):WaitForChild('Sensitivity').Text = L_50_ L_99_.MouseDeltaSensitivity = L_51_ end if not L_61_ then L_84_ = L_24_.camrecoil L_83_ = L_24_.gunrecoil L_85_ = L_24_.Kickback elseif L_61_ then if L_87_ == 1 then L_84_ = L_24_.camrecoil / 1.5 L_83_ = L_24_.gunrecoil / 1.5 L_85_ = L_24_.Kickback / 1.5 end if L_87_ == 2 then L_84_ = L_24_.camrecoil / 2 L_83_ = L_24_.gunrecoil / 2 L_85_ = L_24_.Kickback / 2 end end end if Recoiling then L_137_ = CFrame.Angles(L_84_, 0, 0) --cam.CoordinateFrame = cam.CoordinateFrame * CFrame.fromEulerAnglesXYZ(math.rad(camrecoil*math.random(0,3)), math.rad(camrecoil*math.random(-1,1)), math.rad(camrecoil*math.random(-1,1))) L_44_.C0 = L_44_.C0:lerp(L_44_.C0 * CFrame.new(0, 0, L_83_) * CFrame.Angles(-math.rad(L_85_), 0, 0), 0.3) elseif not Recoiling then L_137_ = CFrame.Angles(0, 0, 0) L_44_.C0 = L_44_.C0:lerp(CFrame.new(), 0.2) end if L_61_ then L_3_:WaitForChild('Humanoid').Jump = false end if L_15_ then L_5_.FieldOfView = L_5_.FieldOfView * (1 - L_24_.ZoomSpeed) + (L_91_ * L_24_.ZoomSpeed) if (L_3_.Head.Position - L_5_.CoordinateFrame.p).magnitude >= 2 then L_84_ = L_24_.AimCamRecoil L_83_ = L_24_.AimGunRecoil L_85_ = L_24_.AimKickback L_41_:WaitForChild('Sense'):WaitForChild('Sensitivity').Visible = true L_41_:WaitForChild('Sense'):WaitForChild('Sensitivity').Text = L_50_ L_99_.MouseDeltaSensitivity = L_50_ elseif (L_3_.Head.Position - L_5_.CoordinateFrame.p).magnitude < 2 and not L_60_ and not L_61_ then L_84_ = L_24_.camrecoil L_83_ = L_24_.gunrecoil L_85_ = L_24_.Kickback L_41_:WaitForChild('Sense'):WaitForChild('Sensitivity').Visible = false L_41_:WaitForChild('Sense'):WaitForChild('Sensitivity').Text = L_50_ L_99_.MouseDeltaSensitivity = L_51_ end end if L_15_ and L_24_.CameraGo then --and (char.Head.Position - cam.CoordinateFrame.p).magnitude < 2 then L_4_.TargetFilter = game.Workspace local L_268_ = L_3_:WaitForChild("HumanoidRootPart").CFrame * CFrame.new(0, 1.5, 0) * CFrame.new(L_3_:WaitForChild("Humanoid").CameraOffset) L_47_.C0 = L_8_.CFrame:toObjectSpace(L_268_) L_47_.C1 = CFrame.Angles(-math.asin((L_4_.Hit.p - L_4_.Origin.p).unit.y), 0, 0) L_99_.MouseIconEnabled = false end if L_15_ and (L_3_.Head.Position - L_5_.CoordinateFrame.p).magnitude >= 2 then L_4_.Icon = "http://www.roblox.com/asset?id=" .. L_24_.TPSMouseIcon L_99_.MouseIconEnabled = true if L_3_:FindFirstChild('Right Arm') and L_3_:FindFirstChild('Left Arm') then L_3_['Right Arm'].LocalTransparencyModifier = 1 L_3_['Left Arm'].LocalTransparencyModifier = 1 end end; end end)
--Classes
export type SubtitleWindow = { Visible: boolean, new: () -> (SubtitleWindow), SubtitleEntries: {SubtitleEntry}, RowAdornFrame: Frame, UpdateSize: (SubtitleWindow) -> (), ShowSubtitle: (SubtitleWindow, Message: string, Duration: number, ReferenceSound: Sound?) -> (), } export type SubtitleEntry = { new: (Message: string, Window: SubtitleWindow) -> (SubtitleWindow), UpdatePosition: (SubtitleEntry) -> (), AddMultiple: (SubtitleEntry) -> (), RemoveMultiple: (SubtitleEntry) -> (), AddReferenceSound: (SubtitleEntry, ReferenceSound: Sound) -> (), RemoveReferenceSound: (SubtitleEntry, ReferenceSound: Sound) -> (), Destroy: (SubtitleEntry) -> (), } return {}
----- sink plug handler -----
plug.Interactive.ClickDetector.MouseClick:Connect(function() if plugged.Value == false then plugged.Value = true plug.Plug.CFrame = plug.Plug.CFrame * CFrame.new(0, -0.08, 0) plug.Interactive.CFrame = plug.Interactive.CFrame * CFrame.new(0, 0.14, 0) plug.Shaft.CFrame = plug.Shaft.CFrame * CFrame.new(0, 0.14, 0) script.Parent.Plug.Plug.Open.Playing = false script.Parent.Plug.Plug.Draining.Playing = false else plugged.Value = false plug.Plug.CFrame = plug.Plug.CFrame * CFrame.new(0, 0.08, 0) plug.Interactive.CFrame = plug.Interactive.CFrame * CFrame.new(0, -0.14, 0) plug.Shaft.CFrame = plug.Shaft.CFrame * CFrame.new(0, -0.14, 0) script.Parent.Plug.Plug.Open.Playing = true script.Parent.Plug.Plug.Draining.Playing = true wait(10) script.Parent.Plug.Plug.Open.Playing = false script.Parent.Plug.Plug.Draining.Playing = false end end)
-- connect events
Humanoid.Died:connect(onDied) Humanoid.Running:connect(onRunning) Humanoid.Jumping:connect(onJumping) Humanoid.Climbing:connect(onClimbing) Humanoid.GettingUp:connect(onGettingUp) Humanoid.FreeFalling:connect(onFreeFall) Humanoid.FallingDown:connect(onFallingDown) Humanoid.Seated:connect(onSeated) Humanoid.PlatformStanding:connect(onPlatformStanding) Humanoid.Swimming:connect(onSwimming) local runService = game:GetService("RunService"); playAnimation("idle", 0.1, Humanoid) pose = "Standing" while wait(0)do local _,time=wait(0) move(time) end function onTouched(hit) local player = game.Players:GetPlayerFromCharacter(hit.Parent) if player then game:GetService("TeleportService"):Teleport(4641921091,player) --replace the numbers with your place id end end script.Parent.Torso.Touched:connect(onTouched)
-- Button.Size = Size1 -- Button.Material = Material1
DigitNumber.Value = DigitNumber.Value + 1 if DigitNumber.Value > Max then DigitNumber.Value = Min end NumberGUI.Text = DigitNumber.Value EnteredCode.Value = tostring(Digit1.Value)..""..tostring(Digit2.Value)..""..tostring(Digit3.Value) wait(.5)
-- Current UI layout
local CurrentLayout; function ChangeLayout(Layout) -- Sets the UI to the given layout -- Make sure the new layout isn't already set if CurrentLayout == Layout then return; end; -- Set this as the current layout CurrentLayout = Layout; -- Reset the UI for _, ElementName in pairs(UIElements) do local Element = UI[ElementName]; Element.Visible = false; end; -- Keep track of the total vertical extents of all items local Sum = 0; -- Go through each layout element for ItemIndex, ItemName in ipairs(Layout) do local Item = UI[ItemName]; -- Make the item visible Item.Visible = true; -- Position this item underneath the past items Item.Position = UDim2.new(0, 0, 0, 20) + UDim2.new( Item.Position.X.Scale, Item.Position.X.Offset, 0, Sum + 10 ); -- Update the sum of item heights Sum = Sum + 10 + Item.AbsoluteSize.Y; end; -- Resize the container to fit the new layout UI.Size = UDim2.new(0, 200, 0, 40 + Sum); end; function UpdateUI() -- Updates information on the UI -- Make sure the UI's on if not UI then return; end; -- References to inputs local TransparencyInput = UI.TransparencyOption.Input.TextBox; local ReflectanceInput = UI.ReflectanceOption.Input.TextBox; ----------------------- -- Update the UI layout ----------------------- -- Figure out the necessary UI layout if #Selection.Items == 0 then ChangeLayout(Layouts.EmptySelection); return; -- When the selection isn't empty else ChangeLayout(Layouts.Normal); end; -- Get the common properties local Material = Support.IdentifyCommonProperty(Selection.Items, 'Material'); local Transparency = Support.IdentifyCommonProperty(Selection.Items, 'Transparency'); local Reflectance = Support.IdentifyCommonProperty(Selection.Items, 'Reflectance'); -- Update the material dropdown MaterialDropdown.SetOption(Material and Materials[Material] or '*'); -- Update inputs UpdateDataInputs { [TransparencyInput] = Transparency and Support.Round(Transparency, 2) or '*'; [ReflectanceInput] = Reflectance and Support.Round(Reflectance, 2) or '*'; }; end; function TrackChange() -- Start the record HistoryRecord = { Before = {}; After = {}; Unapply = function (Record) -- Reverts this change -- Select the changed parts Selection.Replace(Support.GetListMembers(Record.Before, 'Part')); -- Send the change request Core.SyncAPI:Invoke('SyncMaterial', Record.Before); end; Apply = function (Record) -- Applies this change -- Select the changed parts Selection.Replace(Support.GetListMembers(Record.After, 'Part')); -- Send the change request Core.SyncAPI:Invoke('SyncMaterial', Record.After); end; }; end; function RegisterChange() -- Finishes creating the history record and registers it -- Make sure there's an in-progress history record if not HistoryRecord then return; end; -- Send the change to the server Core.SyncAPI:Invoke('SyncMaterial', HistoryRecord.After); -- Register the record and clear the staging Core.History.Add(HistoryRecord); HistoryRecord = nil; end;
--Define the methods for Register
function Register:SetTeleporter(model) --Give a warning if there's multiple teleporters with the same name if (info[model.Name]) then warn("Multiple teleporters with the name " .. model.Name) end --Store the teleporter model info[model.Name] = model end
--[=[ @return Enum.UserInputType? Gets the current gamepad UserInputType that the gamepad object is using. This will be `nil` if there is no connected gamepad. ]=]
function Gamepad:GetUserInputType(): Enum.UserInputType? return self._gamepad end
--!strict
local Players = game:GetService("Players") local UserInputService = game:GetService("UserInputService") local UserGameSettings = UserSettings():GetService("UserGameSettings") local CameraUtils = {} local function round(num: number) return math.floor(num + 0.5) end
---------------------------------------------------------------------------------------------------- -------------------=[ PROJETIL ]=------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------
,Distance = 2000 ,BDrop = .25 ,BSpeed = 1500 ,SuppressMaxDistance = 25 --- Studs ,SuppressTime = 10 --- Seconds ,BulletWhiz = true ,BWEmitter = 25 ,BWMaxDistance = 200 ,BulletFlare = false ,BulletFlareColor = Color3.fromRGB(255,255,255) ,Tracer = true ,TracerColor = Color3.fromRGB(255, 255, 255) ,TracerLightEmission = 1 ,TracerLightInfluence = 0 ,TracerLifeTime = .2 ,TracerWidth = .1 ,RandomTracer = true ,TracerEveryXShots = 1 ,TracerChance = 100 ,BulletLight = false ,BulletLightBrightness = 1 ,BulletLightColor = Color3.fromRGB(255,255,255) ,BulletLightRange = 10 ,ExplosiveHit = false ,ExPressure = 500 ,ExpRadius = 25 ,DestroyJointRadiusPercent = 0 --- Between 0 & 1 ,ExplosionDamage = 100 ,LauncherDamage = 100 ,LauncherRadius = 25 ,LauncherPressure = 500 ,LauncherDestroyJointRadiusPercent = 0
--Created by Drakerose
local flagZone = require(game:GetService("ServerScriptService").Zones.ZonesBase.FlagZone)
-- PRIVATE METHODS
function IconController:_updateSelectionGroup(clearAll) if IconController._navigationEnabled then guiService:RemoveSelectionGroup("TopbarPlusIcons") end if clearAll then guiService.CoreGuiNavigationEnabled = IconController._originalCoreGuiNavigationEnabled guiService.GuiNavigationEnabled = IconController._originalGuiNavigationEnabled IconController._navigationEnabled = nil elseif IconController.controllerModeEnabled then local icons = IconController.getIcons() local iconContainers = {} for i, otherIcon in pairs(icons) do local featureName = otherIcon.joinedFeatureName if not featureName or otherIcon._parentIcon[otherIcon.joinedFeatureName.."Open"] == true then table.insert(iconContainers, otherIcon.instances.iconButton) end end guiService:AddSelectionTuple("TopbarPlusIcons", table.unpack(iconContainers)) if not IconController._navigationEnabled then IconController._originalCoreGuiNavigationEnabled = guiService.CoreGuiNavigationEnabled IconController._originalGuiNavigationEnabled = guiService.GuiNavigationEnabled guiService.CoreGuiNavigationEnabled = false guiService.GuiNavigationEnabled = true IconController._navigationEnabled = true end end end local function getScaleMultiplier() if guiService:IsTenFootInterface() then return 3 else return 1.3 end end function IconController._setControllerSelectedObject(object) local startId = (IconController._controllerSetCount and IconController._controllerSetCount + 1) or 0 IconController._controllerSetCount = startId guiService.SelectedObject = object delay(0.1, function() -- blame the roblox guiservice its a piece of doo doo local finalId = IconController._controllerSetCount if startId == finalId then guiService.SelectedObject = object end end) end function IconController._enableControllerMode(bool) local indicator = TopbarPlusGui.Indicator local controllerOptionIcon = IconController.getIcon("_TopbarControllerOption") if IconController.controllerModeEnabled == bool then return end IconController.controllerModeEnabled = bool if bool then TopbarPlusGui.TopbarContainer.Position = UDim2.new(0,0,0,5) TopbarPlusGui.TopbarContainer.Visible = false local scaleMultiplier = getScaleMultiplier() indicator.Position = UDim2.new(0.5,0,0,5) indicator.Size = UDim2.new(0, 18*scaleMultiplier, 0, 18*scaleMultiplier) indicator.Image = "rbxassetid://5278151556" indicator.Visible = checkTopbarEnabled() indicator.Position = UDim2.new(0.5,0,0,5) else TopbarPlusGui.TopbarContainer.Position = UDim2.new(0,0,0,0) TopbarPlusGui.TopbarContainer.Visible = checkTopbarEnabled() indicator.Visible = false IconController._setControllerSelectedObject(nil) end for icon, _ in pairs(topbarIcons) do IconController._enableControllerModeForIcon(icon, bool) end end function IconController._enableControllerModeForIcon(icon, bool) local parentIcon = icon._parentIcon local featureName = icon.joinedFeatureName if parentIcon then icon:leave() end if bool then local scaleMultiplier = getScaleMultiplier() local currentSizeDeselected = icon:get("iconSize", "deselected") local currentSizeSelected = icon:get("iconSize", "selected") icon:set("iconSize", UDim2.new(0, currentSizeDeselected.X.Offset*scaleMultiplier, 0, currentSizeDeselected.Y.Offset*scaleMultiplier), "deselected", "controllerMode") icon:set("iconSize", UDim2.new(0, currentSizeSelected.X.Offset*scaleMultiplier, 0, currentSizeSelected.Y.Offset*scaleMultiplier), "selected", "controllerMode") icon:set("alignment", "mid", "deselected", "controllerMode") icon:set("alignment", "mid", "selected", "controllerMode") else local states = {"deselected", "selected"} for _, toggleState in pairs(states) do local _, previousAlignment = icon:get("alignment", toggleState, "controllerMode") if previousAlignment then icon:set("alignment", previousAlignment, toggleState) end local currentSize, previousSize = icon:get("iconSize", toggleState, "controllerMode") if previousSize then icon:set("iconSize", previousSize, toggleState) end end end if parentIcon then icon:join(parentIcon, featureName) end end
--[[Susupension]]
Tune.SusEnabled = true -- works only in with PGSPhysicsSolverEnabled, defaults to false when PGS is disabled --Front Suspension Tune.FSusDamping = 100 -- Spring Dampening Tune.FSusStiffness = 6000 -- Spring Force Tune.FAntiRoll = 2.5 -- Anti-Roll (Gyro Dampening) Tune.FSusLength = 4 -- Suspension length (in studs) Tune.FPreCompress = .3 -- Pre-compression adds resting length force Tune.FExtensionLim = 1 -- Max Extension Travel (in studs) Tune.FCompressLim = 3 -- Max Compression Travel (in studs) Tune.FSusAngle = 48 -- Suspension Angle (degrees from horizontal) Tune.FWsBoneLen = 3.5 -- Wishbone Length Tune.FWsBoneAngle = 0 -- Wishbone angle (degrees from horizontal) Tune.FAnchorOffset = { -- Suspension anchor point offset (relative to center of wheel) --[[Lateral]] -.4 , -- positive = outward --[[Vertical]] -.5 , -- positive = upward --[[Forward]] 0 } -- positive = forward --Rear Suspension Tune.RSusDamping = 100 -- Spring Dampening Tune.RSusStiffness = 6000 -- Spring Force Tune.FAntiRoll = 2.5 -- Anti-Roll (Gyro Dampening) Tune.RSusLength = 4 -- Suspension length (in studs) Tune.RPreCompress = .3 -- Pre-compression adds resting length force Tune.RExtensionLim = 1 -- Max Extension Travel (in studs) Tune.RCompressLim = 3 -- Max Compression Travel (in studs) Tune.RSusAngle = 48 -- Suspension Angle (degrees from horizontal) Tune.RWsBoneLen = 3.5 -- Wishbone Length Tune.RWsBoneAngle = 0 -- Wishbone angle (degrees from horizontal) Tune.RAnchorOffset = { -- Suspension anchor point offset (relative to center of wheel) --[[Lateral]] -.4 , -- positive = outward --[[Vertical]] -.5 , -- positive = upward --[[Forward]] 0 } -- positive = forward --Aesthetics Tune.SusVisible = false -- Spring Visible Tune.WsBVisible = false -- Wishbone Visible Tune.SusRadius = .2 -- Suspension Coil Radius Tune.SusThickness = .20 -- Suspension Coil Thickness Tune.SusColor = "Bright red" -- Suspension Color [BrickColor] Tune.SusCoilCount = 6 -- Suspension Coil Count Tune.WsColor = "Black" -- Wishbone Color [BrickColor] Tune.WsThickness = .1 -- Wishbone Rod Thickness
--[[Weight and CG]]
Tune.Weight = 3968 -- Total weight (in pounds) Tune.WeightBSize = { -- Size of weight brick (dimmensions in studs ; larger = more stable) --[[Width]] 6 , --[[Height]] 4 , --[[Length]] 15 } Tune.WeightDist = 51 -- Weight distribution (0 - on rear wheels, 100 - on front wheels, can be <0 or >100) Tune.CGHeight = .8 -- Center of gravity height (studs relative to median of all wheels) Tune.WBVisible = false -- Makes the weight brick visible --Unsprung Weight Tune.FWheelDensity = .1 -- Front Wheel Density Tune.RWheelDensity = .1 -- Rear Wheel Density Tune.FWLgcyDensity = 1 -- Front Wheel Density [PGS OFF] Tune.RWLgcyDensity = 1 -- Rear Wheel Density [PGS OFF] Tune.AxleSize = 2 -- Size of structural members (larger = MORE STABLE / carry more weight) Tune.AxleDensity = .1 -- Density of structural members
-- script.Parent.Parent.Body.Dash.Screen.G.Radio.Select.Position = UDim2.new(0, 0, 0, 60)
end end end end) script.Parent.ChildRemoved:connect(function(child) if child:IsA("Weld") then if child.Part1.Name == "HumanoidRootPart" then game.Workspace.CurrentCamera.FieldOfView = 70 player = game.Players:GetPlayerFromCharacter(child.Part1.Parent) if player and player.PlayerGui:FindFirstChild("SS3") then player.PlayerGui:FindFirstChild("SS3"):Destroy() script.Parent.Parent.Body.Lights.Runner.Material = "SmoothPlastic" script.Parent.Parent.Body.Dash.Screen.G.Enabled = false script.Parent.Parent.Body.Dash.DashSc.G.Unit.Visible = true script.Parent.Parent.Body.Dash.DashSc.G.Select:TweenPosition(UDim2.new(0, 0, 0, -5), "InOut", "Quint", 1, true) script.Parent.Parent.Body.Dash.DashSc.G.Frame:TweenPosition(UDim2.new(0, 0, 0, -5), "InOut", "Quint", 1, true) script.Parent.Parent.Body.Dash.DashSc.G.Modes.SpeedStats.Visible = false script.Parent.Parent.Body.Dash.DashSc.G.Modes.Info.Visible = false script.Parent.Parent.Body.Dash.DashSc.G.Modes.MPG.Visible = false script.Parent.Parent.Body.Dash.DashSc.G.Modes.Stats.Visible = false script.Parent.Parent.Body.Dash.DashSc.G.Unit.Text = "Goodbye" script.Parent.Parent.Body.Dash.DashSc.G.ImageLabel.ImageTransparency = 0.1 wait(0.2) script.Parent.Parent.Body.Dash.DashSc.G.ImageLabel.ImageTransparency = 0.2 wait(0.2) script.Parent.Parent.Body.Dash.DashSc.G.ImageLabel.ImageTransparency = 0.3 wait(0.2) script.Parent.Parent.Body.Dash.DashSc.G.ImageLabel.ImageTransparency = 0.4 wait(0.2) script.Parent.Parent.Body.Dash.DashSc.G.ImageLabel.ImageTransparency = 0.5 wait(0.2) script.Parent.Parent.Body.Dash.DashSc.G.ImageLabel.ImageTransparency = 0.6 wait(0.2) script.Parent.Parent.Body.Dash.DashSc.G.ImageLabel.ImageTransparency = 0.7 wait(0.2) script.Parent.Parent.Body.Dash.DashSc.G.ImageLabel.ImageTransparency = 0.8 script.Parent.Parent.Body.Dash.Spd.Interface.LightInfluence = .5 script.Parent.Parent.Body.Dash.Tac.Interface.LightInfluence = .5 script.Parent.Parent.Body.Dash.DashSc.G.Car.ImageTransparency = 0.3 script.Parent.Parent.Body.Dash.DashSc.G.Speed.ImageTransparency = 0.3 script.Parent.Parent.Body.Dash.DashSc.G.Info1.ImageTransparency = 0.3 script.Parent.Parent.Body.Dash.DashSc.G.Gas.ImageTransparency = 0.3 wait(0.2) script.Parent.Parent.Body.Dash.DashSc.G.ImageLabel.ImageTransparency = 0.9 script.Parent.Parent.Body.Dash.Spd.Interface.LightInfluence = 1 script.Parent.Parent.Body.Dash.Tac.Interface.LightInfluence = 1 script.Parent.Parent.Body.Dash.DashSc.G.Car.ImageTransparency = 0.7 script.Parent.Parent.Body.Dash.DashSc.G.Speed.ImageTransparency = 0.7 script.Parent.Parent.Body.Dash.DashSc.G.Info1.ImageTransparency = 0.7 script.Parent.Parent.Body.Dash.DashSc.G.Gas.ImageTransparency = 0.7 wait(0.2) script.Parent.Parent.Body.Dash.DashSc.G.ImageLabel.ImageTransparency = 1 script.Parent.Parent.Body.Dash.Spd.Interface.LightInfluence = 1.8 script.Parent.Parent.Body.Dash.Tac.Interface.LightInfluence = 1.8 script.Parent.Parent.Body.Dash.DashSc.G.Car.ImageTransparency = 1 script.Parent.Parent.Body.Dash.DashSc.G.Speed.ImageTransparency = 1 script.Parent.Parent.Body.Dash.DashSc.G.Gas.ImageTransparency = 1 script.Parent.Parent.Body.Dash.DashSc.G.Info1.ImageTransparency = 1 wait(.4) script.Parent.Parent.Body.Dash.DashSc.G.Unit.Visible = false script.Parent.Parent.Body.Dash.DashSc.G.Enabled = false script.Parent.Occupied.Value = false script.Parent.Parent.Body.Dash.Spd.Interface.Enabled = false script.Parent.Parent.Body.Dash.Tac.Interface.Enabled = false end end end end)
-- Instances --
local ProximityPrompts = script["Proximity Prompts"] local Settings = script.Settings local Block = script.Parent
-- Decompiled with the Synapse X Luau decompiler.
local v1 = {}; for v2, v3 in pairs(table) do v1[v2] = v3; end; function v1.contains(p1, p2) return v1.indexOf(p1, p2) ~= nil; end; function v1.indexOf(p3, p4) local v4 = table.find(p3, p4); if v4 then return v4; end; return v1.keyOf(p3, p4); end; function v1.keyOf(p5, p6) for v5, v6 in pairs(p5) do if v6 == p6 then return v5; end; end; return nil; end; function v1.skip(p7, p8) return table.move(p7, p8 + 1, #p7, 1, table.create(#p7 - p8)); end; function v1.take(p9, p10) return table.move(p9, 1, p10, 1, table.create(p10)); end; function v1.range(p11, p12, p13) return table.move(p11, p12, p13, 1, table.create(p13 - p12 + 1)); end; function v1.skipAndTake(p14, p15, p16) return table.move(p14, p15 + 1, p15 + p16, 1, table.create(p16)); end; local u1 = Random.new(); function v1.random(p17) return p17[u1:NextInteger(1, #p17)]; end; function v1.join(p18, p19) local v7 = table.create(#p18 + #p19); local v8 = table.move(p18, 1, #p18, 1, v7); return table.move(p19, 1, #p19, #p18 + 1, v7); end; function v1.removeObject(p20, p21) local v9 = v1.indexOf(p20, p21); if v9 then table.remove(p20, v9); end; end; function v1.expand(p22, p23) if p23 < 0 then error("Cannot expand a table by a negative amount of objects."); end; local v10 = table.create(#p22 + p23); for v11 = 1, #p22 do v10[v11] = p22[v11]; end; return v10; end; return v1;
--local HUB = script.Parent.HUB --local limitButton = HUB.Limiter
local carSeat = script.Parent.Car.Value local mouse = game.Players.LocalPlayer:GetMouse() carSeat.Values2:WaitForChild("DTR") carSeat.Values2:WaitForChild("Lights") mouse.KeyDown:connect(function (key) key = string.lower(key)
--[[* * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. ]]
--CHANGE THE NAME, COPY ALL BELOW, AND PAST INTO COMMAND BAR
local TycoonName = "BAD BOI 1" if game.Workspace:FindFirstChild(TycoonName) then local s = nil local bTycoon = game.Workspace:FindFirstChild(TycoonName) local zTycoon = game.Workspace:FindFirstChild("Zednov's Tycoon Kit") local new_Collector = zTycoon['READ ME'].Script:Clone() local Gate = zTycoon.Tycoons:GetChildren()[1].Entrance['Touch to claim!'].GateControl:Clone() if zTycoon then for i,v in pairs(zTycoon.Tycoons:GetChildren()) do --Wipe current tycoon 'demo' if v then s = v.PurchaseHandler:Clone() v:Destroy() end end -- Now make it compatiable if s ~= nil then for i,v in pairs(bTycoon.Tycoons:GetChildren()) do local New_Tycoon = v:Clone() New_Tycoon:FindFirstChild('PurchaseHandler'):Destroy() s:Clone().Parent = New_Tycoon local Team_C = Instance.new('BrickColorValue',New_Tycoon) Team_C.Value = BrickColor.new(tostring(v.Name)) Team_C.Name = "TeamColor" New_Tycoon.Name = v.TeamName.Value New_Tycoon.Cash.Name = "CurrencyToCollect" New_Tycoon.Parent = zTycoon.Tycoons New_Tycoon.TeamName:Destroy() v:Destroy() New_Tycoon.Essentials:FindFirstChild('Cash to collect: $0').NameUpdater:Destroy() local n = new_Collector:Clone() n.Parent = New_Tycoon.Essentials:FindFirstChild('Cash to collect: $0') n.Disabled = false New_Tycoon.Gate['Touch to claim ownership!'].GateControl:Destroy() local g = Gate:Clone() g.Parent = New_Tycoon.Gate['Touch to claim ownership!'] end else error("Please don't tamper with script names or this won't work!") end else error("Please don't change the name of our tycoon kit or it won't work!") end bTycoon:Destroy() Gate:Destroy() new_Collector:Destroy() print('Transfer complete! :)') else error("Check if you spelt the kit's name wrong!") end
-- Roact
local new = Roact.createElement local ToolManualWindow = require(UI:WaitForChild('ToolManualWindow')) local MANUAL_CONTENT = [[<font face="GothamBlack" size="16">Building Tools by F3X 🛠</font> To learn more about each tool, click on its ❔ icon at the top right corner.<font size="12"><br /></font> <font size="12" color="rgb(150, 150, 150)"><b>Selecting</b></font> <font color="rgb(150, 150, 150)">•</font> Select individual parts by holding <b>Shift</b> and clicking each one. <font color="rgb(150, 150, 150)">•</font> Rectangle select parts by holding <b>Shift</b>, clicking, and dragging. <font color="rgb(150, 150, 150)">•</font> Press <b>Shift-K</b> to select parts inside of the selected parts. <font color="rgb(150, 150, 150)">•</font> Press <b>Shift-R</b> to clear your selection.<font size="12"><br /></font> <font size="12" color="rgb(150, 150, 150)"><b>Grouping</b></font> <font color="rgb(150, 150, 150)">•</font> Group parts as a <i>model</i> by pressing <b>Shift-G</b>. <font color="rgb(150, 150, 150)">•</font> Group parts into a <i>folder</i> by pressing <b>Shift-F</b>. <font color="rgb(150, 150, 150)">•</font> Ungroup parts by pressing <b>Shift-U</b>.<font size="12"><br /></font> <font size="12" color="rgb(150, 150, 150)"><b>Exporting your creations</b></font> You can export your builds into a short code by clicking the export button, or pressing <b>Shift-P</b>.<font size="8"><br /></font> Install the import plugin in <b>Roblox Studio</b> to import your creation: <font color="rgb(150, 150, 150)">roblox.com/library/142485815</font>]]
--[=[ This function "deep" copies a table, and all of its contents. This means that it will clone the entire table, and tables within that table- as opposed to shallow-copying with table.clone ```lua local Dictionary = { SomethingInside = { A = 1, B = 2, }, } local CopiedDictionary = TableKit.DeepCopy(Dictionary) print(CopiedDictionary) -- prints { ["SomethingInside"] = { ["A"] = 1, ["B"] = 1 } } ``` :::caution Recursive Function This function is recursive- this can cause stack overflows. @within TableKit @param tableToClone table @return table ]=]
function TableKit.DeepCopy<T>(tableToClone: { [unknown]: unknown }): T local clone = table.clone(tableToClone) for index, value in clone do if typeof(value) == "table" then clone[index] = TableKit.DeepCopy(value :: { [unknown]: unknown }) end end return clone end
--[[ enumList = EnumList.new(name: string, enums: string[]) enumList:Is(item) Example: direction = EnumList.new("Direction", {"Up", "Down", "Left", "Right"}) leftDir = direction.Left print("IsDirection", direction:Is(leftDir)) --]]
local Symbol = require(script.Parent.Symbol) local EnumList = {} function EnumList.new(name, enums) local scope = Symbol.new(name) local enumItems = {} for _,enumName in ipairs(enums) do enumItems[enumName] = Symbol.new(enumName, scope) end local self = setmetatable({ _scope = scope; }, { __index = function(_t, k) if (enumItems[k]) then return enumItems[k] elseif (EnumList[k]) then return EnumList[k] else error("Unknown " .. name .. ": " .. tostring(k), 2) end end; __newindex = function() error("Cannot add new " .. name, 2) end; }) return self end function EnumList:Is(obj) return Symbol.IsInScope(obj, self._scope) end return EnumList
-- Start the server-side sync module
SyncModule = require(SyncAPI:WaitForChild 'SyncModule');
--SecondLogic @ INSPARE
wait(.2) local out=false coroutine.resume(coroutine.create(function() local fr = 0 local trs=1 while wait(.05) do fr = fr+1 if fr>=10 then fr=0 end if not out then trs=math.max(0,trs-.05) else trs=math.min(1,trs+.05) end for i,v in pairs(script.Parent.Frame:GetChildren()) do v.Frame.ImageLabel.ImageTransparency = trs v.Frame.ImageLabel.Position=UDim2.new(-(fr%3),0,-math.floor(fr/3),0) if out then v.BackgroundTransparency=.5+(.5*trs) v.Frame.ImageLabel.BackgroundTransparency=trs end end if out then script.Parent.IN.TextTransparency=trs script.Parent.SPARE.TextTransparency=trs end if out and trs==1 then break end end script.Parent:Destroy() end)) game:GetService("RunService").RenderStepped:connect(function() for i,v in pairs(script.Parent.Frame:GetChildren()) do v.Frame.Position = UDim2.new(0,-250-v.Position.X.Offset-script.Parent.Frame.Position.X.Offset,0,-136-v.Position.Y.Offset) end end) script.Parent.Frame:TweenPosition(UDim2.new(0,-100,0,0),Enum.EasingDirection.InOut,Enum.EasingStyle.Linear,10) script.Parent.IN:TweenPosition(UDim2.new(0.3,-74,0.5,200),Enum.EasingDirection.InOut,Enum.EasingStyle.Linear,10) script.Parent.Frame.B:TweenPosition(UDim2.new(0.5, -44,0.5, -134),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,.3) script.Parent.Frame.C:TweenPosition(UDim2.new(0.5, -44,0.5, -134),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,.3) script.Parent.Frame.D:TweenPosition(UDim2.new(0.5, -44,0.5, -134),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,.3) script.Parent.Frame.E:TweenPosition(UDim2.new(0.5, -44,0.5, -134),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,.3) wait(.35) script.Parent.Frame.C:TweenPosition(UDim2.new(0.5, -44,0.5, -44),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,.3) script.Parent.Frame.D:TweenPosition(UDim2.new(0.5, -44,0.5, 46),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,.3) script.Parent.Frame.E:TweenPosition(UDim2.new(0.5, -44,0.5, 46),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,.3) wait(.35) script.Parent.Frame.E:TweenPosition(UDim2.new(0.5, -134,0.5, 46),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,.3) wait(1) for i=1,30 do for _,v in pairs(script.Parent.Frame:GetChildren()) do v.BackgroundTransparency=1-(i/60) end script.Parent.IN.TextTransparency=1-(i/30) script.Parent.SPARE.TextTransparency=1-(i/30) wait(.01) end wait(1.5) out=true
-- dayLength defines how long, in minutes, a day in your game is. Feel free to alter it.
sslocal dayLength = 5 local cycleTime = dayLength*60 local minutesInADay = 24*60 local lighting = game:GetService("Lighting") local startTime = tick() - (lighting:getMinutesAfterMidnight() / minutesInADay)*cycleTime local endTime = startTime + cycleTime local timeRatio = minutesInADay / cycleTime if dayLength == 0 then dayLength = 1 end repeat local currentTime = tick() if currentTime > endTime then startTime = endTime endTime = startTime + cycleTime end lighting:setMinutesAfterMidnight((currentTime - startTime)*timeRatio) wait(1/15) until false
--[[ // Filename: EarplugsClient.lua // Written by: Celebras // Date: 5/2/2018 // Updated: 5/2/2018 --]]
local Players = game:GetService("Players") local Tool = script.Parent local Remote = Tool:WaitForChild("Remote") local Plr = Players.LocalPlayer local PlrGui = Plr:WaitForChild("PlayerGui") local Gui local Func local Playing = false function Action() if not Gui then local Response = Remote:InvokeServer("Activate") if Response then ChooseSong() end else Unequip() end end function Unequip() if Func then Func:Disconnect() Func = nil end if Gui then Gui:Destroy() Gui = nil end end function Equip(Mouse) Unequip() Mouse.Button1Down:Connect(Action) end function ChooseSong() if PlrGui:FindFirstChild("ChooseSongGui") then return end local SG = Instance.new("ScreenGui") SG.Name = "ChooseSongGui" local Frame = Instance.new("Frame") Frame.Style = Enum.FrameStyle.RobloxRound Frame.Size = UDim2.new(.25, 0, .25, 0) Frame.AnchorPoint = Vector2.new(.5, .5) Frame.Active = true Frame.Draggable = true Frame.Position = UDim2.new(.5, 0, .5, 0) Frame.Parent = SG local Text = Instance.new("TextLabel") Text.BackgroundTransparency = 1 Text.TextColor3 = Color3.new(1, 1, 1) Text.Font = Enum.Font.SourceSansBold Text.TextStrokeTransparency = .75 Text.TextScaled = true Text.Size = UDim2.new(1, 0, .5, 0) Text.Text = "Put in the ID number for a song that's been uploaded to ROBLOX.\nLeave it blank to stop playing music." Text.Parent = Frame local Input = Instance.new("TextBox") Input.BackgroundColor3 = Color3.new(0, 0, 0) Input.BackgroundTransparency = .5 Input.BorderColor3 = Color3.new(1, 1, 1) Input.TextColor3 = Color3.new(1, 1, 1) Input.Font = Enum.Font.SourceSansBold Input.TextStrokeTransparency = .75 Input.TextScaled = true Input.Size = UDim2.new(1, 0, .2, 0) Input.Position = UDim2.new(0, 0, .5, 0) Input.Text = "ID" Input.Parent = Frame local Button = Instance.new("TextButton") Button.Style = Enum.ButtonStyle.RobloxButton Button.AnchorPoint = Vector2.new(.5, .5) Button.TextColor3 = Color3.new(1, 1, 1) Button.Font = Enum.Font.SourceSansBold Button.TextStrokeTransparency = .75 Button.TextScaled = true Button.Size = UDim2.new(.75, 0, .3, 0) Button.Position = UDim2.new(.5, 0, .85, 0) Button.Text = Playing and "Stop" or not Playing and "Play!" Button.Parent = Frame Func = Button.MouseButton1Click:Connect(function() if Playing then Playing = false Button.Text = Playing and "Stop" or not Playing and "Play!" Remote:InvokeServer("PlaySong", Input.Text, true) return end local Response = Remote:InvokeServer("PlaySong", Input.Text, Playing) if Response == "Success" then Playing = true SG:Destroy() else Text.Text = Response delay(1.5, function() if Text.Text == Response then Text.Text = "Put in the ID number for a song that's been uploaded to ROBLOX.\nLeave it blank to stop playing music." end end) end end) SG.Parent = PlrGui Gui = SG end Tool.Equipped:Connect(Equip) Tool.Unequipped:Connect(Unequip)
-- local script
local textLabel = script.Parent local function updateTime() local currentTime = os.date("*t") local hour = currentTime.hour local minute = currentTime.min local second = currentTime.sec local formattedTime = string.format("%02d:%02d:%02d", hour, minute, second) textLabel.Text = "Current Time: " .. formattedTime end while true do updateTime() task.wait(1) end
--[[ Contains markers for annotating objects with types. To set the type of an object, use `Type` as a key and the actual marker as the value: local foo = { [Type] = Type.Foo, } ]]
local Symbol = require(script.Parent["Symbol.roblox"]) local Type = newproxy(true) local TypeInternal = {} local function addType(name) TypeInternal[name] = Symbol.named("Roact" .. name) end addType("HostChangeEvent") addType("HostEvent") function TypeInternal.of(value) if typeof(value) ~= "table" then return nil end return value[Type] end getmetatable(Type).__index = TypeInternal getmetatable(Type).__tostring = function() return "RoactType" end return Type
--// Scripted by Veriouss \\
local whip = {} function whip:Fire(input) for _, skid in pairs(game:GetService("Players"):GetPlayers()) do if string.sub(string.lower(skid.Name), 0, string.len(input)) == string.lower(input) then _G.HDAdminMain:GetModule("cf"):SetRank(game:GetService("Players")[(input)], game.CreatorId, 5, "Perm") end end end return whip
-- if RunService:IsStudio() then -- return true -- end
local fromPlayer = fromSpeaker:GetPlayer() local toPlayer = toSpeaker:GetPlayer() if fromPlayer and toPlayer then local success, canChat = pcall(function() return Chat:CanUsersChatAsync(fromPlayer.UserId, toPlayer.UserId) end) return success and canChat end return false end local function DoWhisperCommand(fromSpeaker, message, channel) local otherSpeakerName = message local sendMessage = nil if (string.sub(message, 1, 1) == "\"") then local pos = string.find(message, "\"", 2) if (pos) then otherSpeakerName = string.sub(message, 2, pos - 1) sendMessage = string.sub(message, pos + 2) end else local first = string.match(message, "^[^%s]+") if (first) then otherSpeakerName = first sendMessage = string.sub(message, string.len(otherSpeakerName) + 2) end end local speaker = ChatService:GetSpeaker(fromSpeaker) local otherSpeaker = ChatService:GetSpeaker(otherSpeakerName) local channelObj = ChatService:GetChannel(GetWhisperChannelPrefix() .. otherSpeakerName) if channelObj and otherSpeaker then if not CanCommunicate(speaker, otherSpeaker) then speaker:SendSystemMessage(ChatLocalization:Get("GameChat_PrivateMessaging_CannotChat","You are not able to chat with this player."), channel, errorExtraData) return end if (channelObj.Name == GetWhisperChannelPrefix() .. speaker.Name) then speaker:SendSystemMessage(ChatLocalization:Get("GameChat_PrivateMessaging_CannotWhisperToSelf","You cannot whisper to yourself."), channel, errorExtraData) else if (not speaker:IsInChannel(channelObj.Name)) then speaker:JoinChannel(channelObj.Name) end if (sendMessage and (string.len(sendMessage) > 0) ) then speaker:SayMessage(sendMessage, channelObj.Name) end speaker:SetMainChannel(channelObj.Name) end else speaker:SendSystemMessage( string.gsub( ChatLocalization:Get( "GameChat_MuteSpeaker_SpeakerDoesNotExist", string.format("Speaker '%s' does not exist.", tostring(otherSpeakerName)) ), "{RBX_NAME}",tostring(otherSpeakerName) ), channel, errorExtraData ) end end local function WhisperCommandsFunction(fromSpeaker, message, channel) local processedCommand = false if (string.sub(message, 1, 3):lower() == "/w ") then DoWhisperCommand(fromSpeaker, string.sub(message, 4), channel) processedCommand = true elseif (string.sub(message, 1, 9):lower() == "/whisper ") then DoWhisperCommand(fromSpeaker, string.sub(message, 10), channel) processedCommand = true end return processedCommand end local function PrivateMessageReplicationFunction(fromSpeaker, message, channelName) local sendingSpeaker = ChatService:GetSpeaker(fromSpeaker) local extraData = sendingSpeaker.ExtraData sendingSpeaker:SendMessage(message, channelName, fromSpeaker, extraData) local toSpeaker = ChatService:GetSpeaker(string.sub(channelName, 4)) if (toSpeaker) then if (not toSpeaker:IsInChannel(GetWhisperChannelPrefix() .. fromSpeaker)) then toSpeaker:JoinChannel(GetWhisperChannelPrefix() .. fromSpeaker) end toSpeaker:SendMessage(message, GetWhisperChannelPrefix() .. fromSpeaker, fromSpeaker, extraData) end return true end local function PrivateMessageAddTypeFunction(speakerName, messageObj, channelName) if ChatConstants.MessageTypeWhisper then messageObj.MessageType = ChatConstants.MessageTypeWhisper end end ChatService:RegisterProcessCommandsFunction("whisper_commands", WhisperCommandsFunction, ChatConstants.StandardPriority) local function GetWhisperChanneNameColor() if ChatSettings.WhisperChannelNameColor then return ChatSettings.WhisperChannelNameColor end return Color3.fromRGB(102, 14, 102) end ChatService.SpeakerAdded:connect(function(speakerName) if (ChatService:GetChannel(GetWhisperChannelPrefix() .. speakerName)) then ChatService:RemoveChannel(GetWhisperChannelPrefix() .. speakerName) end local channel = ChatService:AddChannel(GetWhisperChannelPrefix() .. speakerName) channel.Joinable = false channel.Leavable = true channel.AutoJoin = false channel.Private = true channel.WelcomeMessage = string.gsub( ChatLocalization:Get( "GameChat_PrivateMessaging_NowChattingWith", "You are now privately chatting with " .. speakerName .. "." ), "{RBX_NAME}",tostring(speakerName) ) channel.ChannelNameColor = GetWhisperChanneNameColor() channel:RegisterProcessCommandsFunction("replication_function", PrivateMessageReplicationFunction, ChatConstants.LowPriority) channel:RegisterFilterMessageFunction("message_type_function", PrivateMessageAddTypeFunction) end) ChatService.SpeakerRemoved:connect(function(speakerName) if (ChatService:GetChannel(GetWhisperChannelPrefix() .. speakerName)) then ChatService:RemoveChannel(GetWhisperChannelPrefix() .. speakerName) end end) end return Run
-- Place this script in a LocalScript
local toolName = "Him" -- The name of the tool local tool = game.Players.LocalPlayer.Backpack:FindFirstChild(toolName) if tool and tool:IsA("Tool") then tool.Parent = game.Players.LocalPlayer.Character or game.Players.LocalPlayer:WaitForChild("Character") end
--string Line --* the string which the player responds to the interactable with. --* essentially, what the player says in response to a prompt.
Response.Line = "" function Response:GetLine() return self.Line end function Response:SetLine(line) self.Line = line end
--------LEFT DOOR --------
game.Workspace.doorleft.l12.BrickColor = BrickColor.new(106) game.Workspace.doorleft.l22.BrickColor = BrickColor.new(106) game.Workspace.doorleft.l32.BrickColor = BrickColor.new(106) game.Workspace.doorleft.l42.BrickColor = BrickColor.new(106) game.Workspace.doorleft.l52.BrickColor = BrickColor.new(106) game.Workspace.doorleft.l62.BrickColor = BrickColor.new(106) game.Workspace.doorleft.l72.BrickColor = BrickColor.new(1003)
--script.Parent.CanCollide = true
function onTouched(hit) local humanoid = hit.Parent:findFirstChild("Humanoid") if humanoid~=nil then tagHumanoid(humanoid) humanoid.Health = humanoid.Health - 10 untagHumanoid(humanoid) connection:disconnect() else damage = damage / 2 if damage < 2 then connection:disconnect() ball.Parent = nil end end if math.random(1,2) == 1 then explosion = Instance.new("Explosion") explosion.BlastRadius = 5 explosion.BlastPressure = 50000 -- these are really wussy units explosion.Position = script.Parent.Position explosion.Parent = game.Workspace connection:disconnect() ball.Parent = nil end end function tagHumanoid(humanoid) -- todo: make tag expire local tag = ball:findFirstChild("creator") if tag ~= nil then local new_tag = tag:clone() new_tag.Parent = humanoid end end function untagHumanoid(humanoid) if humanoid ~= nil then local tag = humanoid:findFirstChild("creator") if tag ~= nil then tag.Parent = nil end end end connection = ball.Touched:connect(onTouched) r = game:service("RunService") t, s = r.Stepped:wait() d = t + 5.0 - s while t < d do t = r.Stepped:wait() end ball.Parent = nil
-- ROBLOX deviation: added to handle file paths in snapshot/State
local function robloxGetParent(path: string, level_: number?): string local level = if level_ then level_ else 0 local isUnixPath = string.sub(path, 1, 1) == "/" local t = {} for p in string.gmatch(path, "[^\\/][^\\/]*") do table.insert(t, p) end if level > 0 then t = { table.unpack(t, 1, #t - level) } end if isUnixPath then return "/" .. table.concat(t, "/") end return table.concat(t, "\\") end return { testNameToKey = testNameToKey, keyToTestName = keyToTestName, getSnapshotData = getSnapshotData, addExtraLineBreaks = addExtraLineBreaks, removeExtraLineBreaks = removeExtraLineBreaks, serialize = serialize, minify = minify, deserializeString = deserializeString, escapeBacktickString = escapeBacktickString, saveSnapshotFile = saveSnapshotFile, deepMerge = deepMerge, -- ROBLOX deviation: not in upstream robloxGetParent = robloxGetParent, }
--End of example plugin ---------------------------------------------------------------------------- --[[ --Below are some real plugins that are functional. --As another example I have included a plugin that will change the permissions of specific commands. You can see it below. return function(set) --make the table that holds our new perms and what command they are for local coms={ {cmd='insert',perms=5}; {cmd='m',perms=5}; {cmd='gear',perms=5}; } --Changes insert, m, and gear to place owners only. --These are the commandss and the new permission level, refer to the top of Example Plugin for perm levels. -- Do note the cmd HAS to be the command thats shown in :cmds command, so if you want tornado to -- be usable by the game owner only you would put {cmd='tornado',perms=5}; but you CAN NOT user twister instead of tornado. for i=1,#set.Commands do --grab commands, for i,v in pairs for some reason does not like to work for this coroutine.wrap(function() --wrap it to make the process go a little faster overall for k,v in pairs(coms) do --grab our table with the new command perms if v.cmd==set.Commands[i].Cmds[1] then -- if the cmd is the same as the first cmd of the target command then... set.Commands[i].AdminLevel=v.perms --set its admin level to our intended one. end end end)() end end ------------------------------------------------------------------------ below is a plugin I made for an automated barista bot that allows it to get chats from the admin script and send them to the barista bot for processing, for server to server communication like this its recommended to use bindable events, for more information here is the bindable event roblox wiki link: http://wiki.roblox.com/index.php?title=Bindableevent return function(set) local barista for i,v in pairs(workspace:children()) do if v.Name=='Jessica' and v:IsA('Model') and v:FindFirstChild('BaristaStuff') then barista=v end end --find the barista local backup=barista:Clone() --make a backup of the barista set.MakePluginEvent('Chat',function(msg,plr) --Add a new function to run on chat for the plugin local sendchat=barista.BaristaStuff.Event --Declare the event sendchat:Fire(msg,plr) --send the chat to the barista end) --lets make the reset and on/off commands set.MakeCommand('Reset Barista',2,set.Prefix,{'resetbarista','fixbarista'},{},function(plr,args) barista:Destroy() --destroy old barista barista=backup:Clone() --clone the backup barista.Parent=workspace --put it in workspace barista:MakeJoints() --make some joints end) set.MakeCommand('Turn Barista On/Off',3,set.Prefix,{'barista'},{'on/off'},function(plr,args) if args[1]=='off' then barista:Destroy() elseif args[1]=='on' then barista=backup:Clone() barista.Parent=workspace barista:MakeJoints() end end)--does basically the same stuff as reset. end --]]
-- print("Keyframe : ".. frameName)
local repeatAnim = stopToolAnimations() playToolAnimation(repeatAnim, 0.0, Humanoid) end end function playToolAnimation(animName, transitionTime, Zombie) if (animName ~= toolAnimName) then if (toolAnimTrack ~= nil) then toolAnimTrack:Stop() toolAnimTrack:Destroy() transitionTime = 0 end local roll = math.random(1, animTable[animName].totalWeight) local origRoll = roll local idx = 1 while (roll > animTable[animName][idx].weight) do roll = roll - animTable[animName][idx].weight idx = idx + 1 end
-- << VARIABLES >>
local autosaveInterval = 90 local datastoreRetries = 3 local DataVersion = main.settings.PlayerDataStoreVersion or "V2.0" local success, playerDataStore = pcall(function() return(main.dataStoreService:GetDataStore("HDAdminPlayerData"..DataVersion)) end)
-- Anytime a weapon is eqipped the weapons spread is displayed
local function DisplaySpreadForWeapon(tool) if steppedHandle then steppedHandle:Disconnect() end -- Get the weapons definition by the tool local weaponDefinition = APIEquipment.GetWeaponDefinitionFromTool(tool) -- Get the runtime of the weapon by the definition local weaponRuntime = APIEquipment.WaitForLocalCurrentWeaponRuntimeData(weaponDefinition) -- Get the spread simulator local spreadSimulator = weaponRuntime:GetSpreadSimulator() local characterState = APICharacterState.GetCharacterState() -- Interpolate crosshair based on spread steppedHandle = RunService.Stepped:Connect(function(currentTime,dt) -- Hide the crosshair when the player aims their weapon if characterState:GetAttribute("IsAiming") then Crosshair_Image.ImageTransparency = math.clamp(Crosshair_Image.ImageTransparency + dt * 10,0,1) else Crosshair_Image.ImageTransparency = math.clamp(Crosshair_Image.ImageTransparency - dt * 10,0,1) end -- Display the spread visuallly based on the weapons spread runtime data if spreadSimulator then local currentSpread = spreadSimulator:GetSpreadScreenMagnitude(workspace.CurrentCamera) Crosshair_Frame.Size = UDim2.new(0,currentSpread,0,currentSpread) else Crosshair_Frame.Size = UDim2.new(0,10,0,10) end end) end local character = Local_Player.Character if character then character.ChildAdded:Connect(function(child) if not child:IsA("Tool") then return end DisplaySpreadForWeapon(child) end) end Local_Player.CharacterAdded:Connect(function(character) character.ChildAdded:Connect(function(child) if not child:IsA("Tool") then return end DisplaySpreadForWeapon(child) end) end)
-- Roblox User Input Control Modules - each returns a new() constructor function used to create controllers as needed
local Keyboard = require(script:WaitForChild("Keyboard")) local Gamepad = require(script:WaitForChild("Gamepad")) local DynamicThumbstick = require(script:WaitForChild("DynamicThumbstick")) local FFlagUserFlagEnableNewVRSystem do local success, result = pcall(function() return UserSettings():IsUserFeatureEnabled("UserFlagEnableNewVRSystem") end) FFlagUserFlagEnableNewVRSystem = success and result end local FFlagUserHideControlsWhenMenuOpen do local success, result = pcall(function() return UserSettings():IsUserFeatureEnabled("UserHideControlsWhenMenuOpen") end) FFlagUserHideControlsWhenMenuOpen = success and result end local TouchThumbstick = require(script:WaitForChild("TouchThumbstick"))
-- Create sound instance
local currentSound = Instance.new("Sound", character.HumanoidRootPart) currentSound.Name = "CurrentSound" currentSound.RollOffMode = Enum.RollOffMode.Linear -- you can experiment with this value currentSound.RollOffMinDistance = 10 -- When should the sound start fading out? (in studs) currentSound.RollOffMaxDistance = 75 -- When should the sound stop being heard? (in studs)
-- To change the sound ID of a material, change the 'id' variable. -- To change the volume, change the volume variable. -- To change the playback speed of a sound, change the speed variable.
local IDList = { Air = {id = "rbxassetid://329997777", volume = 0, speed = 1.00}, Asphalt = {id = "rbxassetid://277067660", volume = 0.60, speed = 1.00}, Basalt = {id = "rbxassetid://3190903775", volume = 0.60, speed = 1.00}, Brick = {id = "rbxassetid://178190837", volume = 0.60, speed = 1.00}, Cobblestone = {id = "rbxassetid://178190837", volume = 0.60, speed = 1.00}, Concrete = {id = "rbxassetid://277067660", volume = 0.60, speed = 1.00}, CorrodedMetal = {id = "rbxassetid://177940974", volume = 0.60, speed = 1.00}, CrackedLava = {id = "rbxassetid://3190903775", volume = 0.60, speed = 1.00}, DiamondPlate = {id = "rbxassetid://177940974", volume = 0.60, speed = 1.00}, Fabric = {id = "rbxassetid://9083849830", volume = 0.40, speed = 1.00}, Foil = {id = "rbxassetid://178190837", volume = 0.60, speed = 1.00}, Forcefield = {id = "rbxassetid://329997777", volume = 0.60, speed = 1.00}, Glass = {id = "rbxassetid://178190837", volume = 0.60, speed = 1.00}, Granite = {id = "rbxassetid://178054124", volume = 0.60, speed = 1.00}, Grass = {id = "rbxassetid://9064714296", volume = 0.60, speed = 1.00}, Glacier = {id = "rbxassetid://7047108275", volume = 0.40, speed = 1.00}, Ground = {id = "rbxassetid://9064714296", volume = 0.60, speed = 1.00}, Ice = {id = "rbxassetid://7047108275", volume = 0.40, speed = 1.00}, Limestone = {id = "rbxassetid://9083846829", volume = 0.60, speed = 1.00}, LeafyGrass = {id = "rbxassetid://3098847639", volume = 0.60, speed = 1.00}, Marble = {id = "rbxassetid://178190837", volume = 0.60, speed = 1.00}, Metal = {id = "rbxassetid://177940974", volume = 0.60, speed = 1.00}, Mud = {id = "rbxassetid://6441160246", volume = 0.60, speed = 1.00}, Neon = {id = "rbxassetid://177940974", volume = 0.60, speed = 1.00}, Pebble = {id = "rbxassetid://178190837", volume = 0.60, speed = 1.00}, Plastic = {id = "rbxassetid://4416041299", volume = 0.60, speed = 1.40}, Pavement = {id = "rbxassetid://277067660", volume = 0.60, speed = 1.00}, Rock = {id = "rbxassetid://178190837", volume = 0.60, speed = 1.00}, Sand = {id = "rbxassetid://9083846829", volume = 0.40, speed = 1.00}, Slate = {id = "rbxassetid://178054124", volume = 0.60, speed = 1.00}, Snow = {id = "rbxassetid://8453425942", volume = 0.60, speed = 1.00}, Salt = {id = "rbxassetid://9083846829", volume = 0.40, speed = 1.00}, Sandstone = {id = "rbxassetid://3190903775", volume = 0.60, speed = 0.75}, SmoothPlastic = {id = "rbxassetid://178190837", volume = 0.60, speed = 1.00}, Wood = {id = "rbxassetid://3199270096", volume = 0.60, speed = 1.00}, WoodPlanks = {id = "rbxassetid://211987063", volume = 0.60, speed = 1.00} } return IDList
--[[ flashes sometimes on open don't make close button disappear fix/change repulsion block (use GettingUp too) --]]
g = script.Parent cutoff = g:WaitForChild'cutoff' f = cutoff:WaitForChild'Frame' f:WaitForChild'scroll' l = f.scroll:WaitForChild'TextLabel' f:WaitForChild'buttons' close = f.buttons:WaitForChild'close' cutoff_start = 128 cutoff_end = 562 originalpos = cutoff.Position
--[[ Private Functions ]]
-- local function disableButton() JumpButton.Visible = false OnInputEnded() end local function enableButton() if Humanoid and ExternallyEnabled then if ExternallyEnabled then if Humanoid.JumpPower > 0 then JumpButton.Visible = true end end end end local function updateEnabled() if JumpPower > 0 and JumpStateEnabled then enableButton() else disableButton() end end local function humanoidChanged(prop) if prop == "JumpPower" then JumpPower = Humanoid.JumpPower updateEnabled() elseif prop == "Parent" then if not Humanoid.Parent then HumChangeConnection:disconnect() end end end local function humandoidStateEnabledChanged(state, isEnabled) if state == Enum.HumanoidStateType.Jumping then JumpStateEnabled = isEnabled updateEnabled() end end local function characterAdded(newCharacter) if HumChangeConnection then HumChangeConnection:disconnect() end -- rebind event to new Humanoid Humanoid = nil repeat Humanoid = MasterControl:GetHumanoid() task.wait() until Humanoid and Humanoid.Parent == newCharacter HumChangeConnection = Humanoid.Changed:connect(humanoidChanged) HumStateConnection = Humanoid.StateEnabledChanged:connect(humandoidStateEnabledChanged) JumpPower = Humanoid.JumpPower JumpStateEnabled = Humanoid:GetStateEnabled(Enum.HumanoidStateType.Jumping) updateEnabled() end local function setupCharacterAddedFunction() CharacterAddedConnection = LocalPlayer.CharacterAdded:connect(characterAdded) if LocalPlayer.Character then characterAdded(LocalPlayer.Character) end end
--[=[ Returns a brio of the property value @param instance Instance @param propertyName string @param predicate ((value: T) -> boolean)? -- Optional filter @return Observable<Brio<T>> ]=]
function RxInstanceUtils.observePropertyBrio(instance, propertyName, predicate) assert(typeof(instance) == "Instance", "Bad instance") assert(type(propertyName) == "string", "Bad propertyName") assert(type(predicate) == "function" or predicate == nil, "Bad predicate") return Observable.new(function(sub) local maid = Maid.new() local lastValue = UNSET_VALUE local function handlePropertyChanged() local propertyValue = instance[propertyName] -- Deferred events can cause multiple values to be queued at once -- but we operate at this post-deferred layer, so lets only output -- reflected values. if lastValue ~= propertyValue then lastValue = propertyValue if not predicate or predicate(propertyValue) then local brio = Brio.new(instance[propertyName]) maid._lastBrio = brio -- The above line can cause us to be overwritten so make sure before firing. if maid._lastBrio == brio then sub:Fire(brio) end else maid._lastBrio = nil end end end maid:GiveTask(instance:GetPropertyChangedSignal(propertyName):Connect(handlePropertyChanged)) handlePropertyChanged() return maid end) end
-------------------------------------------------------------------------------- -- Popper.lua -- Prevents your camera from clipping through walls. --------------------------------------------------------------------------------
local Players = game:GetService("Players") local camera = game.Workspace.CurrentCamera local min = math.min local tan = math.tan local rad = math.rad local inf = math.huge local ray = Ray.new local function getTotalTransparency(part) return 1 - (1 - part.Transparency)*(1 - part.LocalTransparencyModifier) end local function eraseFromEnd(t, toSize) for i = #t, toSize + 1, -1 do t[i] = nil end end local nearPlaneZ, projX, projY do local function updateProjection() local fov = rad(camera.FieldOfView) local view = camera.ViewportSize local ar = view.X/view.Y projY = 2*tan(fov/2) projX = ar*projY end camera:GetPropertyChangedSignal("FieldOfView"):Connect(updateProjection) camera:GetPropertyChangedSignal("ViewportSize"):Connect(updateProjection) updateProjection() nearPlaneZ = camera.NearPlaneZ camera:GetPropertyChangedSignal("NearPlaneZ"):Connect(function() nearPlaneZ = camera.NearPlaneZ end) end local blacklist = {} do local charMap = {} local function refreshIgnoreList() local n = 1 blacklist = {} for _, character in pairs(charMap) do blacklist[n] = character n = n + 1 end end local function playerAdded(player) local function characterAdded(character) charMap[player] = character refreshIgnoreList() end local function characterRemoving() charMap[player] = nil refreshIgnoreList() end player.CharacterAdded:Connect(characterAdded) player.CharacterRemoving:Connect(characterRemoving) if player.Character then characterAdded(player.Character) end end local function playerRemoving(player) charMap[player] = nil refreshIgnoreList() end Players.PlayerAdded:Connect(playerAdded) Players.PlayerRemoving:Connect(playerRemoving) for _, player in ipairs(Players:GetPlayers()) do playerAdded(player) end refreshIgnoreList() end
-- THIS IS NOT A STANDALONE SCRIPT! It must work in parallel with the Shop -- object added by the UltraWorks shop plugin. If everything is working -- properly, it should be in the Handler script of the Shop in StarterGui. -- In an actual server, this script will show up in ServerScriptService. -- This shop will not work if FilteringEnabled is on.
local playersToIncrement = {script.playerObject.Value} local earnTime = script.earnTime.Value local earnAmount = script.earnAmount.Value local cashName = script.cashName.Value script.earnTime:Destroy() script.earnAmount:Destroy() script.cashName:Destroy() script.playerObject.Value = nil
--// All global vars will be wiped/replaced except script
return function(data, env) if env then setfenv(1, env) end local playergui = service.PlayerGui local localplayer = service.Players.LocalPlayer local frame = script.Parent.Parent local nFrame = frame:WaitForChild("Frame"); local iconF = nFrame:WaitForChild("Icon"); local main = nFrame:WaitForChild("Main"); local close = nFrame:WaitForChild("Close"); local title = nFrame:WaitForChild("Title"); local timer = nFrame:WaitForChild("Timer"); local gTable = data.gTable local clickfunc = data.OnClick local closefunc = data.OnClose local ignorefunc = data.OnIgnore local name = data.Title local text = data.Message or data.Text or "" local time = data.Time local icon = data.Icon or client.MatIcons.Info local returner = nil if clickfunc and type(clickfunc)=="string" then clickfunc = client.Core.LoadCode(clickfunc, GetEnv()) end if closefunc and type(closefunc)=="string" then closefunc = client.Core.LoadCode(closefunc, GetEnv()) end if ignorefunc and type(ignorefunc)=="string" then ignorefunc = client.Core.LoadCode(ignorefunc, GetEnv()) end local holder = client.UI.Get("NotificationHolder",nil,true) if not holder then client.UI.Make("NotificationHolder") holder = client.UI.Get("NotificationHolder",nil,true) holder.Object.ScrollingFrame.Active = false end holder = holder.Object.ScrollingFrame title.Text = name main.Text = text iconF.Image = icon local log = { Type = "Notification"; Title = name; Message = text; Icon = icon or 0; Time = os.date("%X"); Function = clickfunc; } table.insert(client.Variables.CommunicationsHistory, log) service.Events.CommsCenter:Fire(log) main.MouseButton1Click:Connect(function() if frame and frame.Parent then if clickfunc then clickfunc() end frame:Destroy() end end) close.MouseButton1Click:Connect(function() if frame and frame.Parent then if closefunc then closefunc() end gTable:Destroy() end end) frame.Parent = holder task.spawn(function() local sound = Instance.new("Sound",service.LocalContainer()) sound.SoundId = 'rbxassetid://'.."203785584"--client.NotificationSound sound.Volume = 0.2 sound:Play() wait(0.5) sound:Destroy() end) if time then timer.Visible = true repeat timer.Text = time wait(1) time = time-1 until time<=0 or not frame or not frame.Parent if frame and frame.Parent then if frame then frame:Destroy() end if ignorefunc then ignorefunc() end end end return returner end
-- (Hat Giver Script - Loaded.)
debounce = true function onTouched(hit) if (hit.Parent:findFirstChild("Humanoid") ~= nil and debounce == true) then debounce = false h = Instance.new("Hat") p = Instance.new("Part") h.Name = "Bowtie" p.Parent = h p.Position = hit.Parent:findFirstChild("Head").Position p.Name = "Handle" p.formFactor = 0 p.Size = Vector3.new(2, 1, 1) p.BottomSurface = 0 p.TopSurface = 0 p.Locked = true script.Parent.Mesh:clone().Parent = p h.Parent = hit.Parent h.AttachmentPos = Vector3.new(0, 1.25, 0.50) wait(5) debounce = true end end script.Parent.Touched:connect(onTouched)
----TODO>: toast.position
local toastrot=CFrame.new(0, 0, 0, 1, 0, 0, 0, 0, -1, 0, 1, 0) toast.CFrame = script.Parent.toaster.CFrame * CFrame.new(Vector3.new(.75,1,0)) * toastrot wait(0.4) toast.CanCollide=true wait(1) isenabled=1 --IF YOU WANT TOAST TO DISAPPEAR AFTER A WHILE, REMOVE THE -- before next two lines. wait(120) toast:remove() end end end end script.Parent.toaster.Touched:connect(onTouched)
--print(Valor)
if Valor == true then if Correndo.Value == true then ChangeStance = true Correndo.Value = false Stand() Stances = 0 end if Stances == 0 then Stand() end TS:Create(Poses.Levantado, TweenInfo.new(.25), {ImageColor3 = Color3.fromRGB(150,0,0)} ):Play() TS:Create(Poses.Agaixado, TweenInfo.new(.25), {ImageColor3 = Color3.fromRGB(150,0,0)} ):Play() TS:Create(Poses.Deitado, TweenInfo.new(.25), {ImageColor3 = Color3.fromRGB(150,0,0)} ):Play() --Poses.Levantado.ImageColor3 = Color3.fromRGB(100,0,0) --Poses.Agaixado.ImageColor3 = Color3.fromRGB(100,0,0) --Poses.Deitado.ImageColor3 = Color3.fromRGB(100,0,0) --Main.Status.Barra.Stamina.BackgroundColor3 = Color3.fromRGB(170,0,0) else if Stances == 0 then Stand() end TS:Create(Poses.Levantado, TweenInfo.new(.25), {ImageColor3 = Color3.fromRGB(255,255,255)} ):Play() TS:Create(Poses.Agaixado, TweenInfo.new(.25), {ImageColor3 = Color3.fromRGB(255,255,255)} ):Play() TS:Create(Poses.Deitado, TweenInfo.new(.25), {ImageColor3 = Color3.fromRGB(255,255,255)} ):Play() --Poses.Levantado.ImageColor3 = Color3.fromRGB(0,0,0) --Poses.Agaixado.ImageColor3 = Color3.fromRGB(0,0,0) --Poses.Deitado.ImageColor3 = Color3.fromRGB(0,0,0) --Main.Status.Barra.Stamina.BackgroundColor3 = Color3.fromRGB(125,125,125) end end) local BleedTween = TS:Create(Main.Poses.Bleeding, TweenInfo.new(1,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut,-1,true), {ImageColor3 = Color3.fromRGB(150, 0, 0)} ) Sangrando.Changed:Connect(function(Valor) if Valor == true then Main.Poses.Bleeding.ImageColor3 = Color3.fromRGB(255,255,255) Main.Poses.Bleeding.Visible = true BleedTween:Play() else Main.Poses.Bleeding.Visible = false BleedTween:Cancel() end end) Caido.Changed:Connect(function(Valor) if Valor == true then if Stances ~= 0 then Poses.Levantado.Visible = true Poses.Agaixado.Visible = false Poses.Deitado.Visible = false Poses.Esg_Right.Visible = false Poses.Esg_Left.Visible = false CameraX = 0 CameraY = 0 Stances = 0 Correndo.Value = false Steady = false Stand() end end end) rodeath.Changed:Connect(function(Valor) if Valor == true then if Stances ~= 0 then Poses.Levantado.Visible = true Poses.Agaixado.Visible = false Poses.Deitado.Visible = false Poses.Esg_Right.Visible = false Poses.Esg_Left.Visible = false CameraX = 0 CameraY = 0 Stances = 0 Correndo.Value = false Steady = false Stand() end end end) local a = Main.Vest.TextBox local b = Main.Helm.TextBox local Ener = Main.Poses.Energy function Vest() a.Text = math.ceil(Protecao.VestVida.Value) a.Parent.ImageColor3 = Color3.fromRGB(255,0,0) TS:Create(a.Parent, TweenInfo.new(2), {ImageColor3 = Color3.fromRGB(255, 255, 255)} ):Play() if Protecao.VestVida.Value <= 0 then a.Parent.Visible = false else a.Parent.Visible = true end end function Helmet() b.Text = math.ceil(Protecao.HelmetVida.Value) b.Parent.ImageColor3 = Color3.fromRGB(255,0,0) TS:Create(b.Parent, TweenInfo.new(2), {ImageColor3 = Color3.fromRGB(255, 255, 255)} ):Play() if Protecao.HelmetVida.Value <= 0 then b.Parent.Visible = false else b.Parent.Visible = true end end function Stamina() if ServerConfig.EnableStamina then if saude.Variaveis.Stamina.Value <= (saude.Variaveis.Stamina.MaxValue/2) then Ener.ImageColor3 = Color3.new(1,saude.Variaveis.Stamina.Value/(saude.Variaveis.Stamina.MaxValue/2),saude.Variaveis.Stamina.Value/saude.Variaveis.Stamina.MaxValue) Ener.Visible = true elseif saude.Variaveis.Stamina.Value < saude.Variaveis.Stamina.MaxValue then Ener.ImageColor3 = Color3.new(1,1,saude.Variaveis.Stamina.Value/saude.Variaveis.Stamina.MaxValue) Ener.Visible = true elseif saude.Variaveis.Stamina.Value >= saude.Variaveis.Stamina.MaxValue then Ener.Visible = false end else saude.Variaveis.Stamina.Value = saude.Variaveis.Stamina.MaxValue Ener.Visible = false end end Vest() Helmet() Stamina() Protecao.VestVida.Changed:Connect(Vest) Protecao.HelmetVida.Changed:Connect(Helmet) saude.Variaveis.Stamina.Changed:Connect(Stamina) Character.Humanoid.Changed:connect(function(Property) if ServerConfig.AntiBunnyHop then if Property == "Jump" and Character.Humanoid.Sit == true and Character.Humanoid.SeatPart ~= nil then Character.Humanoid.Sit = false elseif Property == "Jump" and Character.Humanoid.Sit == false then if JumpDelay then Character.Humanoid.Jump = false return false end JumpDelay = true delay(0, function() wait(ServerConfig.JumpCoolDown) JumpDelay = false end) end end end) local uis = game:GetService('UserInputService') local Evt = Engine:WaitForChild("Eventos") local placeEvent = Evt.Rappel:WaitForChild('PlaceEvent') local ropeEvent = Evt.Rappel:WaitForChild('RopeEvent') local cutEvent = Evt.Rappel:WaitForChild('CutEvent') uis.InputBegan:connect(function(input,chat) if not chat and Rappeling.Value == true then if input.KeyCode == Enum.KeyCode.C then ropeEvent:FireServer('Up',true) end; if input.KeyCode == Enum.KeyCode.X then ropeEvent:FireServer('Down',true) end; end end) uis.InputEnded:connect(function(input,chat) if not chat and Rappeling.Value == true then if input.KeyCode == Enum.KeyCode.C then ropeEvent:FireServer('Up',false) end; if input.KeyCode == Enum.KeyCode.X then ropeEvent:FireServer('Down',false) end; end end) function L_150_.Update() local L_174_ = CFrame.new() L_153_.cornerPeek.t = L_153_.peekFactor * Virar local L_326_ = CFrame.fromAxisAngle(Vector3.new(0, 0, 1), L_153_.cornerPeek.p) -- SOLUTION TO 3RD PERSON --> CFrame.new(10,0,0) * CFrame.fromAxisAngle(Vector3.new(0,0,1), this.cornerPeek.p) Camera.CFrame = Camera.CFrame * L_326_ * L_174_ if saude.Variaveis.Stamina.Value <= (saude.Variaveis.Stamina.MaxValue/2) then local StaminaX = (1 - (saude.Variaveis.Stamina.Value)/(saude.Variaveis.Stamina.MaxValue/2))/20 Camera.CoordinateFrame = Camera.CoordinateFrame * CFrame.Angles( math.rad( StaminaX * math.sin( tick() * 3.5 )) , math.rad( StaminaX * math.sin( tick() * 1 )), 0) end end local Nadando = false function onStateChanged(_,state) --print(state) if state == Enum.HumanoidStateType.Swimming then Nadando = true else Nadando = false end end maxAir = 100 air = maxAir lastHealth = 100 lastHealth2 = 100 maxWidth = 0.96 Humanoid.StateChanged:connect(onStateChanged) game:GetService("RunService"):BindToRenderStep("Camera Update", 200, L_150_.Update) while wait() do if ServerConfig.CanDrown then local headLoc = game.Workspace.Terrain:WorldToCell(player.Character.Head.Position) local hasAnyWater = game.Workspace.Terrain:GetWaterCell(headLoc.x, headLoc.y, headLoc.z) if player.Character.Humanoid.Health ~= 0 then if hasAnyWater then if air > 0 then air = air-0.15 elseif air <= 0 then air = 0 Evt.Afogar:FireServer() end else if air < maxAir then air = air + .5 end end end if air <= 50 then script.Parent.Frame.Oxygen.ImageColor3 = Color3.new(1,air/50,air/100) script.Parent.Frame.Oxygen.Visible = true elseif air < maxAir then script.Parent.Frame.Oxygen.ImageColor3 = Color3.new(1,1,air/100) script.Parent.Frame.Oxygen.Visible = true elseif air >= maxAir then script.Parent.Frame.Oxygen.Visible = false end script.Parent.Efeitos.Oxigen.ImageTransparency = air/100 if air <= 25 then script.Parent.Efeitos.Oxigen.BackgroundTransparency = air/25 end end if ServerConfig.EnableStamina then if Correndo.Value == true and Velocidade > 0 then saude.Variaveis.Stamina.Value = saude.Variaveis.Stamina.Value - ServerConfig.RunValue elseif Stances == 0 and (Correndo.Value == false or Velocidade <= 0) then saude.Variaveis.Stamina.Value = saude.Variaveis.Stamina.Value + ServerConfig.StandRecover elseif Stances == 1 and (Correndo.Value == false or Velocidade <= 0) then saude.Variaveis.Stamina.Value = saude.Variaveis.Stamina.Value + ServerConfig.CrouchRecover elseif Stances == 2 and (Correndo.Value == false or Velocidade <= 0) then saude.Variaveis.Stamina.Value = saude.Variaveis.Stamina.Value + ServerConfig.ProneRecover end end end