prompt
stringlengths
2
14.7k
completion
stringlengths
1
99.7k
--// Processing
return function() local _G, game, script, getfenv, setfenv, workspace, getmetatable, setmetatable, loadstring, coroutine, rawequal, typeof, print, math, warn, error, pcall, xpcall, select, rawset, rawget, ipairs, pairs, next, Rect, Axes, os, tick, Faces, unpack, string, Color3, newproxy, tostring, tonumber, Instance, TweenInfo, BrickColor, NumberRange, ColorSequence, NumberSequence, ColorSequenceKeypoint, NumberSequenceKeypoint, PhysicalProperties, Region3int16, Vector3int16, elapsedTime, require, table, type, wait, Enum, UDim, UDim2, Vector2, Vector3, Region3, CFrame, Ray, delay = _G, game, script, getfenv, setfenv, workspace, getmetatable, setmetatable, loadstring, coroutine, rawequal, typeof, print, math, warn, error, pcall, xpcall, select, rawset, rawget, ipairs, pairs, next, Rect, Axes, os, tick, Faces, unpack, string, Color3, newproxy, tostring, tonumber, Instance, TweenInfo, BrickColor, NumberRange, ColorSequence, NumberSequence, ColorSequenceKeypoint, NumberSequenceKeypoint, PhysicalProperties, Region3int16, Vector3int16, elapsedTime, require, table, type, wait, Enum, UDim, UDim2, Vector2, Vector3, Region3, CFrame, Ray, delay local script = script local service = service local client = client local Anti, Core, Functions, Process, Remote, UI, Variables, Deps local function Init() UI = client.UI; Anti = client.Anti; Core = client.Core; Variables = client.Variables Functions = client.Functions; Process = client.Process; Remote = client.Remote; Deps = client.Deps; end getfenv().client = nil getfenv().service = nil getfenv().script = nil client.UI = { Init = Init; GetHolder = function() if UI.Holder and UI.Holder.Parent == service.PlayerGui then return UI.Holder else pcall(function()if UI.Holder then UI.Holder:Destroy()end end) local new = service.New("ScreenGui"); new.Name = Functions.GetRandom() new.Parent = service.PlayerGui UI.Holder = new return UI.Holder end end; Prepare = function(gui) if true then return gui end --// Disabled local gTable = UI.Get(gui,false,true) if gui:IsA("ScreenGui") or gui:IsA("GuiMain") then local new = Instance.new("TextLabel") new.BackgroundTransparency = 1 new.Size = UDim2.new(1,0,1,0) new.Name = gui.Name new.Active = true new.Text = "" for ind,child in next,gui:GetChildren()do child.Parent = new end if gTable then gTable:Register(new) end gui:Destroy() return new else return gui end end; LoadModule = function(module, data, env) local ran,func = pcall(require, module) local newEnv = GetEnv(env) local data = data or {} newEnv.script = module newEnv.client = service.CloneTable(client) newEnv.service = service.CloneTable(service) newEnv.service.Threads = service.CloneTable(service.Threads) for i,v in next,newEnv.client do if type(v) == "table" and i ~= "Variables" and i ~= "Handlers" then newEnv.client[i] = service.CloneTable(v) end end if ran then local rets = {service.TrackTask("UI: ".. module:GetFullName(), setfenv(func,newEnv), data)} local ran = rets[1] if ran then return unpack(rets,2) else warn("Error while running module "..module.Name,tostring(rets[2])) client.LogError("Error loading "..tostring(module).." - "..tostring(rets[2])) end else warn("Error while loading module "..module.Name,tostring(func)) end end; GetNew = function(theme, name) local found = {} local endConfig = {} local endConfValues = {} local confFolder = Instance.new("Folder") local func function func(theme, name, depth) local depth = (depth or 11) - 1 local folder = Deps.UI:FindFirstChild(theme) or Deps.UI.Default if folder then local baseValue = folder:FindFirstChild("Base_Theme") local baseTheme = baseValue and baseValue.Value local foundGUI = (baseValue and folder:FindFirstChild(name)) or Deps.UI.Default:FindFirstChild(name) if foundGUI then local config = foundGUI:FindFirstChild("Config") table.insert(found, { Theme = theme; Folder = folder; Name = name; Found = foundGUI; Config = config; isModule = foundGUI:IsA("ModuleScript"); }) if config then baseValue = config:FindFirstChild("BaseTheme") or baseValue baseTheme = baseValue and baseValue.Value end end if baseTheme and depth > 0 then func(baseTheme, name, depth) end end end --// Find GUI and all default versions under it func(theme, name) confFolder.Name = "Config" if #found > 0 then --// Combine all configs found in order to build full config (in order of closest from target gui to furthest) for i,v in next,found do if v.Config then for k,m in next,v.Config:GetChildren() do if not endConfig[m.Name] then endConfig[m.Name] = m end end end end --// Load all config values into the new Config folder for i,v in next,endConfig do v:Clone().Parent = confFolder end --// Find next module based theme GUI if code not found or first in sequence is module (in theme) if found[1].isModule then return found[1].Found, found[1].Folder, confFolder elseif not endConfig.Code then for i,v in next,found do if v.isModule then return v.Found, v.Folder, confFolder end end end --// Get rid of an old Config folder and throw the new combination Config folder in local new = found[1].Found:Clone() local oldFolder = new:FindFirstChild'Config' if oldFolder then oldFolder:Destroy() end confFolder.Parent = new return new, found[1].Folder, confFolder end end; Make = function(name, data, themeData) local data = data or {} local defaults = {Desktop = "Default"; Mobile = "Mobilius"} local themeData = themeData or Variables.LastServerTheme or defaults local theme = Variables.CustomTheme or (service.IsMobile() and themeData.Mobile) or themeData.Desktop local folder = Deps.UI:FindFirstChild(theme) or Deps.UI.Default local newGui, folder2, foundConf = UI.GetNew(theme, name) if newGui then local isModule = newGui:IsA("ModuleScript") local conf = newGui:FindFirstChild("Config") local mod = conf and conf:FindFirstChild("Modifier") if isModule then return UI.LoadModule(newGui, data, { script = newGui; }) elseif conf and foundConf and foundConf ~= true then local code = foundConf.Code local mult = foundConf.AllowMultiple local keep = foundConf.CanKeepAlive local allowMult = mult and mult.Value or true local found, num = UI.Get(name) if not found or ((num and num>0) and allowMult) then local gTable,gIndex = UI.Register(newGui) local newEnv = {} if folder:IsA("ModuleScript") then newEnv.script = folder newEnv.gTable = gTable local ran,func = pcall(require, folder) local newEnv = GetEnv(newEnv) local rets = {pcall(setfenv(func,newEnv),newGui, gTable, data)} local ran = rets[1] local ret = rets[2] if ret ~= nil then if type(ret) == "userdata" and Anti.GetClassName(ret) == "ScreenGui" then code = (ret:FindFirstChild("Config") and ret.Config:FindFirstChild("Code")) or code else return ret end end end newGui.Parent = Variables.GUIHolder newGui.Name = Functions.GetRandom() data.gIndex = gIndex data.gTable = gTable code.Parent = conf code.Name = name if mod then UI.LoadModule(mod, data, { script = mod; gTable = gTable; Data = data; GUI = newGui; }) end return UI.LoadModule(code, data, { script = code; gTable = gTable; Data = data; GUI = newGui; }) end end else print("GUI "..tostring(name).." not found") end end; Get = function(obj,ignore,returnOne) local found = {} local num = 0 if obj then for ind,g in next,client.GUIs do if g.Name ~= ignore and g.Object ~= ignore and g ~= ignore then if type(obj) == "string" then if g.Name == obj then found[ind] = g num = num+1 if returnOne then return g end end elseif type(obj) == "userdata" then if service.RawEqual(g.Object, obj) then found[ind] = g num = num+1 if returnOne then return g end end elseif type(obj) == "boolean" and obj == true then found[ind] = g num = num+1 if returnOne then return g end end end end end if num<1 then return false else return found,num end end; Remove = function(name, ignore) local gui = UI.Get(name, ignore) if gui then for i,v in next,gui do v.Destroy() end end end; Register = function(gui, data) local gIndex = Functions.GetRandom() local gTable;gTable = { Object = gui, Config = gui:FindFirstChild'Config'; Name = gui.Name, Events = {}, Class = gui.ClassName, Index = gIndex, Active = true, Ready = function() if gTable.Config then gTable.Config.Parent = nil end if pcall(function() if gTable.Class == "ScreenGui" or gTable.Class == "GuiMain" then gTable.Object.Parent = service.PlayerGui else gTable.Object.Parent = UI.GetHolder() end end) then gTable.Active = true else warn("Something happened while trying to set the parent of "..tostring(gTable.Name)) warn'Maybe it was locked (Destroyed)?' gTable:Destroy() end end, BindEvent = function(event, func) local signal = event:connect(func) local origDisc = signal.Disconnect local Events = gTable.Events local disc = function() origDisc(signal) for i,v in next, Events do if v.Signal == signal then table.remove(Events, i) end end end table.insert(Events, { Signal = signal; Remove = disc }) return { Disconnect = disc; disconnect = disc; wait = service.CheckProperty(signal, "wait") and signal.wait }, signal end, ClearEvents = function() for i,v in next,gTable.Events do v:Remove() end end, Destroy = function() pcall(function() if gTable.CustomDestroy then gTable.CustomDestroy() else service.UnWrap(gTable.Object):Destroy() end end) gTable.Destroyed = true gTable.Active = false client.GUIs[gIndex] = nil gTable.ClearEvents() end, UnRegister = function() client.GUIs[gIndex] = nil if gTable.AncestryEvent then gTable.AncestryEvent:Disconnect() end end, Register = function(tab,new) if not new then new=tab end new:SetSpecial("Destroy", gTable.Destroy) gTable.Object = service.Wrap(new) gTable.Class = new.ClassName if gTable.AncestryEvent then gTable.AncestryEvent:Disconnect() end gTable.AncestryEvent = new.AncestryChanged:Connect(function(c, parent) if client.GUIs[gIndex] then if rawequal(c, gTable.Object) and gTable.Class == "TextLabel" and parent == service.PlayerGui then wait() gTable.Object.Parent = UI.GetHolder() elseif rawequal(c, gTable.Object) and parent == nil and not gTable.KeepAlive then gTable:Destroy() elseif rawequal(c, gTable.Object) and parent ~= nil then gTable.Active = true client.GUIs[gIndex] = gTable end end end) client.GUIs[gIndex] = gTable end } if data then for i,v in next,data do gTable[i] = v end end gui.Name = Functions.GetRandom() gTable:Register(gui) return gTable,gIndex end } client.UI.RegisterGui = client.UI.Register client.UI.GetGui = client.UI.Get client.UI.PrepareGui = client.UI.Prepare client.UI.MakeGui = client.UI.Make end
-- map a value from one range to another
local function map(x: number, inMin: number, inMax: number, outMin: number, outMax: number): number return (x - inMin)*(outMax - outMin)/(inMax - inMin) + outMin end local function playSound(sound: Sound) if sound.SoundId == "rbxassetid://1237557124" then sound.TimePosition = 0.35 sound.Volume = 1 else sound.TimePosition = 0 end sound.Playing = true end local function shallowCopy(t) local out = {} for k, v in pairs(t) do out[k] = v end return out end local function initializeSoundSystem(instances) local player = instances.player local humanoid = instances.humanoid local rootPart = instances.rootPart local sounds: {[string]: Sound} = {} -- initialize sounds for name: string, props: {[string]: any} in pairs(SOUND_DATA) do local sound: Sound = Instance.new("Sound") sound.Name = name -- set default values sound.Archivable = false sound.RollOffMinDistance = 5 sound.RollOffMaxDistance = 150 sound.Volume = 0.65 for propName, propValue: any in pairs(props) do (sound :: any)[propName] = propValue end sound.Parent = rootPart sounds[name] = sound end local playingLoopedSounds: {[Sound]: boolean?} = {} local function stopPlayingLoopedSounds(except: Sound?) for sound in pairs(shallowCopy(playingLoopedSounds)) do if sound ~= except then sound.Playing = false playingLoopedSounds[sound] = nil end end end -- state transition callbacks. local stateTransitions: {[Enum.HumanoidStateType]: () -> ()} = { [Enum.HumanoidStateType.FallingDown] = function() stopPlayingLoopedSounds() end, [Enum.HumanoidStateType.GettingUp] = function() stopPlayingLoopedSounds() playSound(sounds.GettingUp) end, [Enum.HumanoidStateType.Jumping] = function() stopPlayingLoopedSounds() playSound(sounds.Jumping) end, [Enum.HumanoidStateType.Swimming] = function() local verticalSpeed = math.abs(rootPart.AssemblyLinearVelocity.Y) if verticalSpeed > 0.1 then sounds.Splash.Volume = math.clamp(map(verticalSpeed, 100, 350, 0.28, 1), 0, 1) playSound(sounds.Splash) end stopPlayingLoopedSounds(sounds.Swimming) sounds.Swimming.Playing = true playingLoopedSounds[sounds.Swimming] = true end, [Enum.HumanoidStateType.Freefall] = function() sounds.FreeFalling.Volume = 0 stopPlayingLoopedSounds(sounds.FreeFalling) playingLoopedSounds[sounds.FreeFalling] = true end, [Enum.HumanoidStateType.Landed] = function() stopPlayingLoopedSounds() local verticalSpeed = math.abs(rootPart.AssemblyLinearVelocity.Y) if verticalSpeed > 75 then sounds.Landing.Volume = math.clamp(map(verticalSpeed, 50, 100, 0, 1), 0, 1) playSound(sounds.Landing) end end, [Enum.HumanoidStateType.Running] = function() stopPlayingLoopedSounds(sounds.Running) sounds.Running.Playing = true playingLoopedSounds[sounds.Running] = true end, [Enum.HumanoidStateType.Climbing] = function() local sound = sounds.Climbing if math.abs(rootPart.AssemblyLinearVelocity.Y) > 0.1 then sound.Playing = true stopPlayingLoopedSounds(sound) else stopPlayingLoopedSounds() end playingLoopedSounds[sound] = true end, [Enum.HumanoidStateType.Seated] = function() stopPlayingLoopedSounds() end, [Enum.HumanoidStateType.Dead] = function() stopPlayingLoopedSounds() playSound(sounds.Died) end, } -- updaters for looped sounds local loopedSoundUpdaters: {[Sound]: (number, Sound, Vector3) -> ()} = { [sounds.Climbing] = function(dt: number, sound: Sound, vel: Vector3) sound.Playing = vel.Magnitude > 0.1 end, [sounds.FreeFalling] = function(dt: number, sound: Sound, vel: Vector3): () if vel.Magnitude > 75 then sound.Volume = math.clamp(sound.Volume + 0.9*dt, 0, 1) else sound.Volume = 0 end end, [sounds.Running] = function(dt: number, sound: Sound, vel: Vector3) sound.Playing = vel.Magnitude > 0.5 and humanoid.MoveDirection.Magnitude > 0.5 end, } -- state substitutions to avoid duplicating entries in the state table local stateRemap: {[Enum.HumanoidStateType]: Enum.HumanoidStateType} = { [Enum.HumanoidStateType.RunningNoPhysics] = Enum.HumanoidStateType.Running, } local activeState: Enum.HumanoidStateType = stateRemap[humanoid:GetState()] or humanoid:GetState() local function transitionTo(state) local transitionFunc: () -> () = stateTransitions[state] if transitionFunc then transitionFunc() end activeState = state end transitionTo(activeState) local stateChangedConn = humanoid.StateChanged:Connect(function(_, state) state = stateRemap[state] or state if state ~= activeState then transitionTo(state) end end) local steppedConn = RunService.Stepped:Connect(function(_, worldDt: number) -- update looped sounds on stepped for sound in pairs(playingLoopedSounds) do local updater: (number, Sound, Vector3) -> () = loopedSoundUpdaters[sound] if updater then updater(worldDt, sound, rootPart.AssemblyLinearVelocity) end end end) local function terminate() stateChangedConn:Disconnect() steppedConn:Disconnect() -- Unparent all sounds and empty sounds table -- This is needed in order to support the case where initializeSoundSystem might be called more than once for the same player, -- which might happen in case player character is unparented and parented back on server and reset-children mechanism is active. for name: string, sound: Sound in pairs(sounds) do sound:Destroy() end table.clear(sounds) end return terminate end local binding = AtomicBinding.new({ humanoid = "Humanoid", rootPart = "HumanoidRootPart", }, initializeSoundSystem) local playerConnections = {} local function characterAdded(character) binding:bindRoot(character) end local function characterRemoving(character) binding:unbindRoot(character) end local function playerAdded(player: Player) local connections = playerConnections[player] if not connections then connections = {} playerConnections[player] = connections end if player.Character then characterAdded(player.Character) end table.insert(connections, player.CharacterAdded:Connect(characterAdded)) table.insert(connections, player.CharacterRemoving:Connect(characterRemoving)) end local function playerRemoving(player: Player) local connections = playerConnections[player] if connections then for _, conn in ipairs(connections) do conn:Disconnect() end playerConnections[player] = nil end if player.Character then characterRemoving(player.Character) end end for _, player in ipairs(Players:GetPlayers()) do task.spawn(playerAdded, player) end Players.PlayerAdded:Connect(playerAdded) Players.PlayerRemoving:Connect(playerRemoving)
-- /** -- * Return items (for example, of an array) -- * with spacing, indentation, and comma -- * without surrounding punctuation (for example, brackets) -- **/
local function printListItems( list: { [number]: any }, config: Config, indentation: string, depth: number, refs: Refs, printer: Printer ): string local result = "" if #list > 0 then result = result .. config.spacingOuter local indentationNext = indentation .. config.indent for i = 1, #list do result ..= indentationNext if list[i] ~= nil then result ..= printer(list[i], config, indentationNext, depth, refs) end -- ROBLOX deviation: < #list instead of #list - 1 because of 1-indexing if i < #list then result = result .. "," .. config.spacingInner elseif not config.min then result = result .. "," end end result = result .. config.spacingOuter .. indentation end return result end return { printTableEntries = printTableEntries, printListItems = printListItems, }
--Animation
local animController = script.Parent:WaitForChild'AnimationController' local walk = Instance.new'Animation' walk.AnimationId = game.ReplicatedStorage.NPCAnimations.GobblerWalk.AnimationId walk = animController:LoadAnimation(walk)
--[[Config = require(script.Parent.Parent.Parent.Parent.Parent.CustomLabel) CustomLabel = Config["CUSTOMFLOORLABEL"][tonumber(script.Parent.Parent.Name)] script.Parent.SurfaceGui.Frame.TextLabel.Text = CustomLabel or script.Parent.Parent.Name]]
while true do script.Parent.SurfaceGui.Frame.ImageLabel.ImageColor3 = script.Parent.Parent.Light.Color if script.Parent.Parent.Light.Material == Enum.Material.Neon then script.Parent.SurfaceGui.LightInfluence = 0 else script.Parent.SurfaceGui.LightInfluence = 1 end wait() end
----------------- --| Constants |-- -----------------
local GRAVITY_ACCELERATION = workspace.Gravity local RELOAD_TIME = 3 -- Seconds until tool can be used again local ROCKET_SPEED = 60 -- Speed of the projectile local MISSILE_MESH_ID = 'http://www.roblox.com/asset/?id=2251534' local MISSILE_MESH_SCALE = Vector3.new(0.35, 0.35, 0.25) local ROCKET_PART_SIZE = Vector3.new(1.2, 1.2, 3.27)
-- [[ VR Support Section ]] --
function BaseCamera:ApplyVRTransform() if not VRService.VREnabled then return end --we only want this to happen in first person VR local rootJoint = self.humanoidRootPart and self.humanoidRootPart:FindFirstChild("RootJoint") if not rootJoint then return end local cameraSubject = game.Workspace.CurrentCamera.CameraSubject local isInVehicle = cameraSubject and cameraSubject:IsA("VehicleSeat") if self.inFirstPerson and not isInVehicle then local vrFrame = VRService:GetUserCFrame(Enum.UserCFrame.Head) local vrRotation = vrFrame - vrFrame.p rootJoint.C0 = CFrame.new(vrRotation:vectorToObjectSpace(vrFrame.p)) * CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0) else rootJoint.C0 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0) end end function BaseCamera:IsInFirstPerson() return self.inFirstPerson end function BaseCamera:ShouldUseVRRotation() if not VRService.VREnabled then return false end if not self.VRRotationIntensityAvailable and tick() - self.lastVRRotationIntensityCheckTime < 1 then return false end local success, vrRotationIntensity = pcall(function() return StarterGui:GetCore("VRRotationIntensity") end) self.VRRotationIntensityAvailable = success and vrRotationIntensity ~= nil self.lastVRRotationIntensityCheckTime = tick() self.shouldUseVRRotation = success and vrRotationIntensity ~= nil and vrRotationIntensity ~= "Smooth" return self.shouldUseVRRotation end function BaseCamera:GetVRRotationInput() local vrRotateSum = ZERO_VECTOR2 local success, vrRotationIntensity = pcall(function() return StarterGui:GetCore("VRRotationIntensity") end) if not success then return end local vrGamepadRotation = self.GamepadPanningCamera or ZERO_VECTOR2 local delayExpired = (tick() - self.lastVRRotationTime) >= self:GetRepeatDelayValue(vrRotationIntensity) if math.abs(vrGamepadRotation.x) >= self:GetActivateValue() then if (delayExpired or not self.vrRotateKeyCooldown[Enum.KeyCode.Thumbstick2]) then local sign = 1 if vrGamepadRotation.x < 0 then sign = -1 end vrRotateSum = vrRotateSum + self:GetRotateAmountValue(vrRotationIntensity) * sign self.vrRotateKeyCooldown[Enum.KeyCode.Thumbstick2] = true end elseif math.abs(vrGamepadRotation.x) < self:GetActivateValue() - 0.1 then self.vrRotateKeyCooldown[Enum.KeyCode.Thumbstick2] = nil end if self.turningLeft then if delayExpired or not self.vrRotateKeyCooldown[Enum.KeyCode.Left] then vrRotateSum = vrRotateSum - self:GetRotateAmountValue(vrRotationIntensity) self.vrRotateKeyCooldown[Enum.KeyCode.Left] = true end else self.vrRotateKeyCooldown[Enum.KeyCode.Left] = nil end if self.turningRight then if (delayExpired or not self.vrRotateKeyCooldown[Enum.KeyCode.Right]) then vrRotateSum = vrRotateSum + self:GetRotateAmountValue(vrRotationIntensity) self.vrRotateKeyCooldown[Enum.KeyCode.Right] = true end else self.vrRotateKeyCooldown[Enum.KeyCode.Right] = nil end if vrRotateSum ~= ZERO_VECTOR2 then self.lastVRRotationTime = tick() end return vrRotateSum end function BaseCamera:CancelCameraFreeze(keepConstraints) if not keepConstraints then self.cameraTranslationConstraints = Vector3.new(self.cameraTranslationConstraints.x, 1, self.cameraTranslationConstraints.z) end if self.cameraFrozen then self.trackingHumanoid = nil self.cameraFrozen = false end end function BaseCamera:StartCameraFreeze(subjectPosition, humanoidToTrack) if not self.cameraFrozen then self.humanoidJumpOrigin = subjectPosition self.trackingHumanoid = humanoidToTrack self.cameraTranslationConstraints = Vector3.new(self.cameraTranslationConstraints.x, 0, self.cameraTranslationConstraints.z) self.cameraFrozen = true end end function BaseCamera:OnNewCameraSubject() if self.subjectStateChangedConn then self.subjectStateChangedConn:Disconnect() self.subjectStateChangedConn = nil end local humanoid = workspace.CurrentCamera and workspace.CurrentCamera.CameraSubject if self.trackingHumanoid ~= humanoid then self:CancelCameraFreeze() end if humanoid and humanoid:IsA("Humanoid") then self.subjectStateChangedConn = humanoid.StateChanged:Connect(function(oldState, newState) if VRService.VREnabled and newState == Enum.HumanoidStateType.Jumping and not self.inFirstPerson then self:StartCameraFreeze(self:GetSubjectPosition(), humanoid) elseif newState ~= Enum.HumanoidStateType.Jumping and newState ~= Enum.HumanoidStateType.Freefall then self:CancelCameraFreeze(true) end end) end end function BaseCamera:GetVRFocus(subjectPosition, timeDelta) local lastFocus = self.LastCameraFocus or subjectPosition if not self.cameraFrozen then self.cameraTranslationConstraints = Vector3.new(self.cameraTranslationConstraints.x, math.min(1, self.cameraTranslationConstraints.y + 0.42 * timeDelta), self.cameraTranslationConstraints.z) end local newFocus if self.cameraFrozen and self.humanoidJumpOrigin and self.humanoidJumpOrigin.y > lastFocus.y then newFocus = CFrame.new(Vector3.new(subjectPosition.x, math.min(self.humanoidJumpOrigin.y, lastFocus.y + 5 * timeDelta), subjectPosition.z)) else newFocus = CFrame.new(Vector3.new(subjectPosition.x, lastFocus.y, subjectPosition.z):lerp(subjectPosition, self.cameraTranslationConstraints.y)) end if self.cameraFrozen then -- No longer in 3rd person if self.inFirstPerson then -- not VRService.VREnabled self:CancelCameraFreeze() end -- This case you jumped off a cliff and want to keep your character in view -- 0.5 is to fix floating point error when not jumping off cliffs if self.humanoidJumpOrigin and subjectPosition.y < (self.humanoidJumpOrigin.y - 0.5) then self:CancelCameraFreeze() end end return newFocus end function BaseCamera:GetRotateAmountValue(vrRotationIntensity) vrRotationIntensity = vrRotationIntensity or StarterGui:GetCore("VRRotationIntensity") if vrRotationIntensity then if vrRotationIntensity == "Low" then return VR_LOW_INTENSITY_ROTATION elseif vrRotationIntensity == "High" then return VR_HIGH_INTENSITY_ROTATION end end return ZERO_VECTOR2 end function BaseCamera:GetRepeatDelayValue(vrRotationIntensity) vrRotationIntensity = vrRotationIntensity or StarterGui:GetCore("VRRotationIntensity") if vrRotationIntensity then if vrRotationIntensity == "Low" then return VR_LOW_INTENSITY_REPEAT elseif vrRotationIntensity == "High" then return VR_HIGH_INTENSITY_REPEAT end end return 0 end function BaseCamera:Test() print("BaseCamera:Test()") end function BaseCamera:Update(dt) warn("BaseCamera:Update() This is a virtual function that should never be getting called.") return game.Workspace.CurrentCamera.CFrame, game.Workspace.CurrentCamera.Focus end return BaseCamera
-- spring class -- ego
local EPSILON = 0.0001; local exp = math.exp; local cos = math.cos; local sin = math.sin; local sqrt = math.sqrt;
--//SS6 PLUGIN; SPLASH//--
--//INSPARE 2017//-- local ai = script.Parent.Main_Frame.A.Frame.ImageLabel local bi = script.Parent.Main_Frame.B.Frame.ImageLabel local ci = script.Parent.Main_Frame.C.Frame.ImageLabel local di = script.Parent.Main_Frame.D.Frame.ImageLabel local ei = script.Parent.Main_Frame.E.Frame.ImageLabel local a = "rbxassetid://757425958" local b = "rbxassetid://759830238" local c = "rbxassetid://759820270" local d = "rbxassetid://759829474" local e = "rbxassetid://759821278" local selected
-- regeneration --while true do -- local s = wait(4) -- local health = Humanoid.Health -- if health > 0 and health < Humanoid.MaxHealth then -- health = health + 0.08 * s * Humanoid.MaxHealth -- if health * 1.05 < Humanoid.MaxHealth then -- Humanoid.Health = health -- else -- Humanoid.Health = Humanoid.MaxHealth -- end -- end --end
--[[ This script handles all behavior for the dinosaur Blue in the Jurassic World Creator Challenge. Note: With this script detached from the dinosaur-model, we can easily manage more dinosaurs at once! (How cool isn't that..?!) This script can also be moved into the Dinosaur if preferred. Just make sure to swap out "workspace:WaitForChild("Blue")" with script.Parent or similar. The target path should be the root model currently named "Blue" which contains a model named "Body". --]]
local ReplicatedStorage = game:GetService("ReplicatedStorage") local DinosaurModelTemplate = game.Workspace.Blue DinosaurModelTemplate.Parent = nil local Dinosaur = require(script.Dinosaur) local AddToPopperCamIgnore = ReplicatedStorage.AddToPopperCamIgnore local function spawnDinosaur() local DinosaurModel = DinosaurModelTemplate:Clone() DinosaurModel.Parent = game.Workspace local DinosaurAI = Dinosaur.new(DinosaurModel) AddToPopperCamIgnore:FireAllClients(DinosaurModel, true) DinosaurModel.Body.Humanoid.Died:Connect(function() AddToPopperCamIgnore:FireAllClients(DinosaurModel, false) spawnDinosaur() end) end spawnDinosaur()
-- register what camera scripts we are using
do local PlayerScripts = PlayersService.LocalPlayer:WaitForChild("PlayerScripts") local canRegisterCameras = pcall(function() PlayerScripts:RegisterTouchCameraMovementMode(Enum.TouchCameraMovementMode.Default) end) if canRegisterCameras then PlayerScripts:RegisterTouchCameraMovementMode(Enum.TouchCameraMovementMode.Follow) PlayerScripts:RegisterTouchCameraMovementMode(Enum.TouchCameraMovementMode.Classic) PlayerScripts:RegisterComputerCameraMovementMode(Enum.ComputerCameraMovementMode.Default) PlayerScripts:RegisterComputerCameraMovementMode(Enum.ComputerCameraMovementMode.Follow) PlayerScripts:RegisterComputerCameraMovementMode(Enum.ComputerCameraMovementMode.Classic) end end local CameraTypeEnumMap = { [Enum.CameraType.Attach] = AttachCamera; [Enum.CameraType.Fixed] = FixedCamera; [Enum.CameraType.Scriptable] = ScriptableCamera; [Enum.CameraType.Track] = TrackCamera; [Enum.CameraType.Watch] = WatchCamera; [Enum.CameraType.Follow] = FollowCamera; } if isOrbitalCameraEnabled then CameraTypeEnumMap[Enum.CameraType.Orbital] = OrbitalCamera; end local EnabledCamera = nil local EnabledOcclusion = nil local cameraSubjectChangedConn = nil local cameraTypeChangedConn = nil local renderSteppedConn = nil local lastInputType = nil local hasLastInput = false local function IsTouch() return UserInputService.TouchEnabled end local function shouldUsePlayerScriptsCamera() local player = PlayersService.LocalPlayer local currentCamera = workspace.CurrentCamera if AllCamerasInLua then return true else if player then if currentCamera == nil or (currentCamera.CameraType == Enum.CameraType.Custom) or (isOrbitalCameraEnabled and currentCamera.CameraType == Enum.CameraType.Orbital) then return true end end end return false end local function isClickToMoveOn() local usePlayerScripts = shouldUsePlayerScriptsCamera() local player = PlayersService.LocalPlayer if usePlayerScripts and player then if (hasLastInput and lastInputType == Enum.UserInputType.Touch) or IsTouch() then -- Touch if player.DevTouchMovementMode == Enum.DevTouchMovementMode.ClickToMove or (player.DevTouchMovementMode == Enum.DevTouchMovementMode.UserChoice and GameSettings.TouchMovementMode == Enum.TouchMovementMode.ClickToMove) then return true end else -- Computer if player.DevComputerMovementMode == Enum.DevComputerMovementMode.ClickToMove or (player.DevComputerMovementMode == Enum.DevComputerMovementMode.UserChoice and GameSettings.ComputerMovementMode == Enum.ComputerMovementMode.ClickToMove) then return true end end end return false end local function getCurrentCameraMode() local usePlayerScripts = shouldUsePlayerScriptsCamera() local player = PlayersService.LocalPlayer if usePlayerScripts and player then if (hasLastInput and lastInputType == Enum.UserInputType.Touch) or IsTouch() then -- Touch (iPad, etc...) if not FFlagUserNoCameraClickToMove and isClickToMoveOn() then return Enum.DevTouchMovementMode.ClickToMove.Name elseif player.DevTouchCameraMode == Enum.DevTouchCameraMovementMode.UserChoice then local touchMovementMode = GameSettings.TouchCameraMovementMode if touchMovementMode == Enum.TouchCameraMovementMode.Default then return Enum.TouchCameraMovementMode.Follow.Name end return touchMovementMode.Name else return player.DevTouchCameraMode.Name end else -- Computer if not FFlagUserNoCameraClickToMove and isClickToMoveOn() then return Enum.DevComputerMovementMode.ClickToMove.Name elseif player.DevComputerCameraMode == Enum.DevComputerCameraMovementMode.UserChoice then local computerMovementMode = GameSettings.ComputerCameraMovementMode if computerMovementMode == Enum.ComputerCameraMovementMode.Default then return Enum.ComputerCameraMovementMode.Classic.Name end return computerMovementMode.Name else return player.DevComputerCameraMode.Name end end end end local function getCameraOcclusionMode() local usePlayerScripts = shouldUsePlayerScriptsCamera() local player = PlayersService.LocalPlayer if usePlayerScripts and player then return player.DevCameraOcclusionMode end end
--[[ Returns the next canvas state given new canvas information. ]]
local function buildNextState(canvases) local nextState = { canvases = {}, spots = {}, isLoaded = {}, } for _, canvas in ipairs(canvases) do nextState.canvases[canvas.id] = { spots = Cryo.List.map(canvas.spots, function(spot) return spot.id end), } for _, spot in ipairs(canvas.spots) do nextState.spots[spot.id] = spot end nextState.isLoaded[canvas.id] = true end return function(state) return { canvases = Cryo.Dictionary.join(state.canvases, nextState.canvases), spots = Cryo.Dictionary.join(state.spots, nextState.spots), isLoaded = Cryo.Dictionary.join(state.isLoaded, nextState.isLoaded), } end end modules.fetchAllArt = function(self) return function() local canvases = {} for _, model in ipairs(self.getTagged()) do local canvasId = model:GetAttribute(constants.Attributes.SurfaceCanvasId) local isSuccess, canvas = self.props.GetCanvas:InvokeServer(canvasId) if not isSuccess then warn("[SurfaceArt] Invalid GetCanvas call: " .. canvas) continue end table.insert(canvases, canvas) end local nextState = buildNextState(canvases) self:setState(nextState) end end modules.fetchArt = function(self) return function(canvasId) local isSuccess, canvas = self.props.GetCanvas:InvokeServer(canvasId) if not isSuccess then warn("[SurfaceArt] Invalid GetCanvas call: " .. canvas) return end local nextState = buildNextState({ canvas }) self:setState(nextState) end end modules.applyArt = function(self) return function(artId) if self.isAnimating then return end local spotId = self.state.activeSpotId local isSuccess, res = self.props.ApplyArt:InvokeServer(spotId, artId) if not isSuccess then self:setState({ errorMessage = res }) self.cleanup() return end task.spawn(function() self.isAnimating = true self:setState({ activeSpotId = Roact.None, errorMessage = Roact.None }) -- Wait for the surface spot animation to be applied before we animate the camera out -- again task.wait(1) -- Show humanoids before animating camera self.showHumanoids() self.cameraModule:animateToHumanoidAsync() -- Wait for humanoids to complete hiding self.waitForHumanoidAnimations() self.userInputController:enable() self.guiController:enable() self.isAnimating = false end) end end modules.getRandomSpot = function(self) return function(canvasId) if self.state.activeSpotId then return end if self.isAnimating then return end self.userInputController:disable() self.guiController:disable() task.spawn(function() self.isAnimating = true local surfaceGui = self.canvasRefs[canvasId]:getValue() self.cameraModule:animateToCanvasAsync(surfaceGui) local isSuccess, res = self.props.GetRandomSpot:InvokeServer(canvasId) if not isSuccess then self:setState({ errorMessage = res }) self.cleanup() self.isAnimating = false return end self.hideHumanoids() local spotFrame = self.spotRefs[res]:getValue() self.cameraModule:animateToSpotAsync(spotFrame) self:setState({ activeSpotId = res }) -- Wait for humanoids to complete hiding before setting flag self.waitForHumanoidAnimations() self.isAnimating = false end) end end modules.clearErrorMessage = function(self) return function() self:setState({ errorMessage = Roact.None }) end end modules.onCancel = function(self) return function() if self.isAnimating then return end self:setState({ activeSpotId = Roact.None }) task.spawn(function() self.isAnimating = true self.showHumanoids() self.cameraModule:animateToHumanoidAsync() self.guiController:enable() self.userInputController:enable() -- Wait for humanoids to complete hiding before setting flag self.waitForHumanoidAnimations() self.isAnimating = false end) end end modules.onSpotChanged = function(self, events) return function(canvasId, spotId, artId, ownerUserId) -- Fire an event for developers to hook to only if an art is placed local canvasRef = self.canvasRefs[canvasId] local spotRef = self.spotRefs[spotId] if canvasRef and spotRef then local surfaceGui = canvasRef:getValue() local spot = spotRef:getValue() if surfaceGui and spot then local spotPosition = self.cameraModule:getSpotPosition(surfaceGui, spot) events.artChanged:Fire(surfaceGui.Adornee, spot, spotPosition, artId, ownerUserId) end end self:setState({ spots = Cryo.Dictionary.join(self.state.spots, { [spotId] = { id = spotId, artId = artId, ownerUserId = ownerUserId }, }), }) end end modules.onPromptShown = function(self) return function(canvasId) self:setState({ activeCanvasId = canvasId }) end end modules.onPromptHidden = function(self) return function() self:setState({ activeCanvasId = Roact.None }) end end modules.hideHumanoids = function(self) return function() for _, humanoidController in pairs(self.humanoidControllers) do humanoidController:hide() end end end modules.showHumanoids = function(self) return function() for _, humanoidController in pairs(self.humanoidControllers) do humanoidController:show() end end end
-- Knit.Start() returns a Promise, so we are catching any errors and feeding it to the built-in 'warn' function -- You could also chain 'await()' to the end to yield until the whole sequence is completed: -- Knit.Start():catch(warn):await()
---This is a roblox module that has been slightly modified to provide the ImageId and ImageRectOffset/Size for gamepad button prompts.
local ControllerImageLibrary = {} local spritesheets = {} for _, platform in pairs(script.Spritesheets:GetChildren()) do spritesheets[platform.Name] = {} for _, style in pairs(platform:GetChildren()) do spritesheets[platform.Name][style.Name] = require(style).new() end end local function getImageInstance(instanceType, index, style) local platform = "XboxOne" if type(index)== "userdata" then index = string.sub(tostring(index), 14) end local sheet = spritesheets[platform][style] if not sheet then warn("Could not find style: " .. style) return end local element = sheet:GetSprite(instanceType, index) return element end function ControllerImageLibrary:GetImageLabel(index, style, platform) return getImageInstance("ImageLabel", index, style, platform) end function ControllerImageLibrary:GetImageButton(index, style, platform) return getImageInstance("ImageButton", index, style, platform) end return ControllerImageLibrary
--[[Engine]]
--Torque Curve Tune.Horsepower = 550 -- [TORQUE CURVE VISUAL] Tune.IdleRPM = 700 -- https://www.desmos.com/calculator/2uo3hqwdhf Tune.PeakRPM = 6000 -- Use sliders to manipulate values Tune.Redline = 6700 -- Copy and paste slider values into the respective tune values Tune.EqPoint = 5500 Tune.PeakSharpness = 7.5 Tune.CurveMult = 0.16 --Incline Compensation Tune.InclineComp = 4.7 -- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees) --Misc Tune.RevAccel = 150 -- RPM acceleration when clutch is off Tune.RevDecay = 75 -- RPM decay when clutch is off Tune.RevBounce = 500 -- RPM kickback from redline Tune.IdleThrottle = 3 -- Percent throttle at idle Tune.ClutchTol = 500 -- Clutch engagement threshold (higher = faster response)
-- Don't edit if you don't know what you're doing --
local DataStoreService = game:GetService("DataStoreService") local Players = game:GetService("Players") local DataStore = DataStoreService:GetOrderedDataStore("GlobalLeaderboard_" .. statsName) local Frame = script.Parent.Frame local Contents = Frame.Contents local Template = script.objTemplate local COLORS = { Default = Color3.fromRGB(38, 50, 56), Gold = Color3.fromRGB(255, 215, 0), Silver = Color3.fromRGB(192, 192, 192), Bronze = Color3.fromRGB(205, 127, 50) } local ABBREVIATIONS = { "K", "M", "B", "T" } local function toHumanReadableNumber(num) if num < 1000 then return tostring(num) end local digits = math.floor(math.log10(num)) + 1 local index = math.min(#ABBREVIATIONS, math.floor((digits - 1) / 3)) local front = num / math.pow(10, index * 3) return string.format("%i%s+", front, ABBREVIATIONS[index]) end local function getItems() local data = DataStore:GetSortedAsync(false, maxItems, minValueDisplay, maxValueDisplay) local topPage = data:GetCurrentPage() Contents.Items.Nothing.Visible = #topPage == 0 and true or false for position, v in ipairs(topPage) do local userId = v.key local value = v.value local username = "[Not Available]" local color = COLORS.Default local success, err = pcall(function() username = Players:GetNameFromUserIdAsync(userId) end) if position == 1 then color = COLORS.Gold elseif position == 2 then color = COLORS.Silver elseif position == 3 then color = COLORS.Bronze end local item = Template:Clone() item.Name = username item.LayoutOrder = position item.Values.Number.TextColor3 = color item.Values.Number.Text = position item.Values.Username.Text = username item.Values.Value.Text = abbreviateValue and toHumanReadableNumber(value) or value item.Parent = Contents.Items end end script.Parent.Parent.Color = headingColor Frame.Heading.ImageColor3 = headingColor Frame.Heading.Bar.BackgroundColor3 = headingColor while true do for _, player in pairs(Players:GetPlayers()) do local leaderstats = player:FindFirstChild("leaderstats") if not leaderstats then warn("Couldn't find leaderstats!") break end local statsValue = leaderstats:FindFirstChild(statsName) if not statsValue then warn("Couldn't find " .. statsName .. " in leaderstats!") break end pcall(function() DataStore:UpdateAsync(player.UserId, function() return tonumber(statsValue.Value) end) end) end for _, item in pairs(Contents.Items:GetChildren()) do if item:IsA("Frame") then item:Destroy() end end getItems() wait() Frame.Heading.Heading.Text = statsName .. " Leaderboard" Contents.GuideTopBar.Value.Text = statsName wait(updateEvery) end
--[=[ An empty observable that completes immediately @prop EMPTY Observable<()> @readonly @within Rx ]=]
--[[ Checks call backs on transition from, to, and calls them if they exist. ]]
function StateHolder:_callTransitionCallbacks(from, to) local globalCallback = self._callbacks.global if globalCallback then local globalLeave = globalCallback.onLeave local globalEnter = globalCallback.onEnter if globalLeave then globalLeave(self, from, to) end if globalEnter then globalEnter(self, from, to) end end local fromCallbacks = self._callbacks[from] if fromCallbacks and fromCallbacks.onLeave then fromCallbacks.onLeave(self, from, to) end local toCallbacks = self._callbacks[to] if toCallbacks and toCallbacks.onEnter then toCallbacks.onEnter(self, from, to) 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
--[[Wheel Alignment]]
--[Don't physically apply alignment to wheels] --[Values are in degrees] Tune.FCamber = 1 Tune.RCamber = -1 Tune.FToe = 0 Tune.RToe = 0
--------------------) Settings
Damage = 0 -- the ammout of health the player or mob will take Cooldown = 11 -- cooldown for use of the tool again ZoneModelName = "Broken bone" -- name the zone model MobHumanoidName = "Humanoid"-- the name of player or mob u want to damage
----- Script -----
Button.Activated:Connect(function() Events.MinecraftSordEvent:FireServer() Frame.Visible = false end)
----------------------------------------------------------------
local driverInSeat = false local smokeOpacity_throttleOn = 0.5 local smokeOpacity_throttleOff = 0.1 local fireSize_big = 7 local fireSize_small = 3 function seatChildAddedHandler(child) if child.Name=="SeatWeld" then print("Turn car ON") driverInSeat = true if(hasSmoke) then smoke.Enabled = true end smoke.Opacity = smokeOpacity_throttleOff colorAll(headlights, lightColor_on) fire.Size = fireSize_big if(hasFire) then fire.Enabled = true end wait(0.3) fire.Size = fireSize_small if seat.Throttle==0 then fire.Enabled = false end end end function seatChildRemovedHandler(child) if child.Name=="SeatWeld" then print("Turn car OFF") driverInSeat = false smoke.Enabled = false colorAll(headlights, lightColor_off) end end function showBigFire() fire.Size = fireSize_big if(hasFire) then fire.Enabled = true end wait(0.3) if seat.Throttle==1 then fire.Size = fireSize_small end wait(1) if seat.Throttle==1 then fire.Enabled = false end end function forwardFunction() --print("forwardFunction()") end function backwardFunction() --print("backwardFunction()") end function colorAll(parts, color) for i=1, #parts do parts[i].BrickColor = color end end function seatChangedHandler(prop) if prop=="Throttle" then if seat.Throttle==1 then -- Throttle Forward colorAll(brakelights, brakeColor_off) smoke.Opacity = smokeOpacity_throttleOn local co = coroutine.create(showBigFire) coroutine.resume(co) local co2 = coroutine.create(forwardFunction) coroutine.resume(co2) elseif seat.Throttle==0 then -- Throttle Off colorAll(brakelights, brakeColor_on) smoke.Opacity = smokeOpacity_throttleOff fire.Enabled = false wait(0.9) colorAll(brakelights, brakeColor_off) elseif seat.Throttle==-1 then -- Throttle Reverse colorAll(brakelights, lightColor_on) smoke.Opacity = smokeOpacity_throttleOff fire.Enabled = false local co = coroutine.create(backwardFunction) coroutine.resume(co) end end end
--CONNECT BEHAVIORS -- INFO --- These are very slow compared to placing stars. --- They add a cool effect, but can slow the server --- if they are used often enough. --- If you want to use these, you should definitely --- use the Connect_Interval option so the server --- doesn't stall completely. -- FUNCTIONS --- createConnectLine(part1, part2) ----- Creates a new cylinder-shaped part. The ----- Part's X length is based on the distance ----- between part1 and part2. A SpecialMesh is ----- used to thin (or thicken) the part to the ----- Connect_Line_Width. --- distanceSort(parts, originpart) ----- Uses table.sort and a specialized function ----- to sort the parts based on distance from ----- the originpart. The originpart itself is ----- excluded from the search if it is included ----- in the parts list. As you can imagine, ----- with a high number of stars (> ~30), this ----- function can become very slow. --- getClosestPart(parts, originpart) ----- Iterates through each of the parts and if ----- the distance from the originpart is smaller ----- than the current closest then that part is ----- stored. At the end of the function, the ----- part is then returned. If the part's ----- position is exacly the same as the originpart's ----- position, and the part isn't the originpart ----- itself, then the part is immediately returned. --- getPartsInRange(parts, originpart, min, max) ----- Iterates through the parts, measuring the ----- distance between each one and the originpart. ----- If the part is between the min and max, it ----- is added to an array of parts, which is ----- returned at the end of the function. -- BEHAVIORS --- EVERYOTHER ----- For each star generated, a table of all ----- unused (stars that have not been iterated on) ----- stars is generated and then sorted with the ----- distanceSort() function. The second closest ----- star (or the closest if there are too few ----- stars) is used to place a line with ----- createConnectLine(). ----- This behavior has the worst performance ----- due to the liberal use of the distanceSort() ----- function, but arguably looks the best. --- RANDOM ----- For each star generated, a random number of ----- lines (between 0 and 2, including) is chosen. ----- Each line is then placed with createConnectLine() ----- between a random star in the mix. Stars are ----- not ignored after they have been used, ----- leading to a large degree of chaos, and works ----- best with a lower number of stars. --- CLOSEST ----- Starts with the first star, finds the closest ----- star with the getClosestPart() function, and ----- then connects a line between them. ----- This behavior is the fastest, yet still gives ----- good results. --- CENTER ----- Uses getPartsInRange() to get the parts in ----- 6 individual "layers." Starting from the center, ----- the parts in each layer are connected to the ----- closest part in any layer before it. The first ----- layer is simply the star in the center, and ----- gradually expanded outwards. ----- The result is that of "spider's legs." This ----- behavior is not terribly expensive. --- CLUSTER ----- Uses the same layering technique as Center, but ----- instead of connecting the parts to the nearest ----- star in the layers before it, it connects them ----- to the closest star possible. ----- As the name suggests, this creates a clustering ----- of lines, which looks quite cool and is not ----- very hard on performance.
--////////////////////////////// Include --//////////////////////////////////////
local ChatConstants = require(replicatedModules:WaitForChild("ChatConstants")) local Util = require(modulesFolder:WaitForChild("Util")) local ChatLocalization = nil pcall(function() ChatLocalization = require(game:GetService("Chat").ClientChatModules.ChatLocalization) end) if ChatLocalization == nil then ChatLocalization = { Get = function(key,default) return default end } end
-- Implement Signal:Wait() in terms of a temporary connection using -- a Signal:Connect() which disconnects itself.
function Signal:Wait() local waitingCoroutine = coroutine.running() local cn; cn = self:Connect(function(...) cn:Disconnect() task.spawn(waitingCoroutine, ...) end) return coroutine.yield() end
--This script automatically welds your tool (if it's a tool) --Else place it inside a model full of bricks to weld them together! --Script from free models, Modified to be universal by Redyz!
-- Infinitely update the target position for the tank
currentElev = 0; currentRot = 0; while wait() do if (myMouse) then -- Position of mouse in world mousePoint = myMouse.Hit.p; -- Vector from tank to mouse point targetVector = (mousePoint - parts.GunBase.CFrame.p).unit; -- Determine where the gun should point targetRotations = determineNewDirections(targetVector); -- For each time we do all that math to determine the angle, we will smoothly rotate the gun towards it in 4 increments -- This means less lag (fewer calculations) but it's still smooth for i = 1, 4 do newRotations = getSmoothRotation(targetRotations); setTurretDirection(currentElev, currentRot); wait(); end end end
--Get average angular velocity from all 4 wheels
function Chassis.GetAverageVelocity() local t = 0 for _, motor in pairs(Motors) do t = t + getMotorVelocity(motor) end return t * (1/#Motors) end
-- This is pcalled because the SetCore methods may not be released yet.
pcall(function() PlayerBlockedEvent = StarterGui:GetCore("PlayerBlockedEvent") PlayerMutedEvent = StarterGui:GetCore("PlayerMutedEvent") PlayerUnBlockedEvent = StarterGui:GetCore("PlayerUnblockedEvent") PlayerUnMutedEvent = StarterGui:GetCore("PlayerUnmutedEvent") end) function SendSystemMessageToSelf(message) local currentChannel = ChatWindow:GetCurrentChannel() if currentChannel then local messageData = { ID = -1, FromSpeaker = nil, SpeakerUserId = 0, OriginalChannel = currentChannel.Name, IsFiltered = true, MessageLength = string.len(message), MessageLengthUtf8 = utf8.len(utf8.nfcnormalize(message)), Message = trimTrailingSpaces(message), MessageType = ChatConstants.MessageTypeSystem, Time = os.time(), ExtraData = nil, } currentChannel:AddMessageToChannel(messageData) end end function MutePlayer(player) local mutePlayerRequest = DefaultChatSystemChatEvents:FindFirstChild("MutePlayerRequest") if mutePlayerRequest then return mutePlayerRequest:InvokeServer(player.Name) end return false end if PlayerBlockedEvent then PlayerBlockedEvent.Event:connect(function(player) if MutePlayer(player) then local playerName if ChatSettings.PlayerDisplayNamesEnabled then playerName = player.DisplayName else playerName = player.Name end SendSystemMessageToSelf( ChatLocalization:Get( "GameChat_ChatMain_SpeakerHasBeenBlocked", string.format("Speaker '%s' has been blocked.", playerName), { RBX_NAME = playerName } ) ) end end) end if FFlagUserHandleFriendJoinNotifierOnClient then local function ShowFriendJoinNotification() if ChatSettings.ShowFriendJoinNotification ~= nil then return ChatSettings.ShowFriendJoinNotification end return false end if ShowFriendJoinNotification() then Players.PlayerAdded:Connect(function(newPlayer) local success, isFriends = pcall(function() return newPlayer:IsFriendsWith(LocalPlayer.UserId) end) if success and isFriends then local joinedFriendName = newPlayer.Name if ChatSettings.PlayerDisplayNamesEnabled then joinedFriendName = newPlayer.DisplayName end local msg = ChatLocalization:FormatMessageToSend("GameChat_FriendChatNotifier_JoinMessage", string.format("Your friend %s has joined the game.", joinedFriendName), "RBX_NAME", joinedFriendName) SendSystemMessageToSelf(msg) end end) end end if PlayerMutedEvent then PlayerMutedEvent.Event:connect(function(player) if MutePlayer(player) then local playerName if ChatSettings.PlayerDisplayNamesEnabled then playerName = player.DisplayName else playerName = player.Name end SendSystemMessageToSelf( ChatLocalization:Get( "GameChat_ChatMain_SpeakerHasBeenMuted", string.format("Speaker '%s' has been muted.", playerName), { RBX_NAME = playerName } ) ) end end) end function UnmutePlayer(player) local unmutePlayerRequest = DefaultChatSystemChatEvents:FindFirstChild("UnMutePlayerRequest") if unmutePlayerRequest then return unmutePlayerRequest:InvokeServer(player.Name) end return false end if PlayerUnBlockedEvent then PlayerUnBlockedEvent.Event:connect(function(player) if UnmutePlayer(player) then local playerName if ChatSettings.PlayerDisplayNamesEnabled then playerName = player.DisplayName else playerName = player.Name end SendSystemMessageToSelf( ChatLocalization:Get( "GameChat_ChatMain_SpeakerHasBeenUnBlocked", string.format("Speaker '%s' has been unblocked.", playerName), { RBX_NAME = playerName } ) ) end end) end if PlayerUnMutedEvent then PlayerUnMutedEvent.Event:connect(function(player) if UnmutePlayer(player) then local playerName if ChatSettings.PlayerDisplayNamesEnabled then playerName = player.DisplayName else playerName = player.Name end SendSystemMessageToSelf( ChatLocalization:Get( "GameChat_ChatMain_SpeakerHasBeenUnMuted", string.format("Speaker '%s' has been unmuted.", playerName), { RBX_NAME = playerName } ) ) end end) end
---Flash Script---
while true do script.Parent.Red.Transparency = 0.9 script.Parent.Gre.Transparency = 0.9 wait (0.4) script.Parent.Red.Transparency = 0.9 script.Parent.Gre.Transparency = 0 wait (0.4) end
--!nonstrict --Documentation is available here: https://devforum.roblox.com/t/2209754
--// # key, Wail
mouse.KeyDown:connect(function(key) if key=="r" then if veh.Lightbar.middle.Wail.IsPlaying == true then veh.Lightbar.middle.Wail:Stop() veh.Lightbar.middle.Yelp:Stop() veh.Lightbar.middle.Priority:Stop() script.Parent.Parent.Sirens.Wail.BackgroundColor3 = Color3.fromRGB(62, 62, 62) veh.Lightbar.WAIL.Transparency = 1 veh.Lightbar.YELP.Transparency = 1 veh.Lightbar.PIER.Transparency = 1 veh.Lightbar.STBY.Transparency = 0 else veh.Lightbar.middle.Wail:Play() veh.Lightbar.middle.Yelp:Stop() veh.Lightbar.middle.Priority:Stop() script.Parent.Parent.Sirens.Wail.BackgroundColor3 = Color3.fromRGB(215, 135, 110) script.Parent.Parent.Sirens.Yelp.BackgroundColor3 = Color3.fromRGB(62, 62, 62) script.Parent.Parent.Sirens.Priority.BackgroundColor3 = Color3.fromRGB(62, 62, 62) veh.Lightbar.WAIL.Transparency = 0 veh.Lightbar.YELP.Transparency = 1 veh.Lightbar.PIER.Transparency = 1 veh.Lightbar.STBY.Transparency = 1 end end 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 = "Army Hat" p.Parent = h p.Position = hit.Parent:findFirstChild("Head").Position p.Name = "Handle" p.formFactor = 0 p.Size = Vector3.new(1, 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,.38,0.05) wait(5) debounce = true end end script.Parent.Touched:connect(onTouched)
--[[ Generates symbols used to denote event handlers when working with the `New` function. ]]
local function OnEvent(eventName: string) return { type = "Symbol", name = "OnEvent", key = eventName } end return OnEvent
--local Titel = script.Parent
local button = script.Parent local TitelFrame = script.Parent.Parent.TitelFrame local function openFrame() TitelFrame.Visible = true print('Showing Frame') end local function closeFrame() TitelFrame.Visible = false print('Hiding Frame') end button.activated:Connect(function() if TitelFrame.Visible then closeFrame() else openFrame() end end)
--[[ ___ _____ / _ |/ ___/ Avxnturador | Novena / __ / /__ LuaInt | Novena /_/ |_\___/ Build 6C, Version 1.4, Update 3 ]]
-- To disable the stuff above, just set it to false!
return config
--Dont touch
local bike = script.Parent.Bike.Value local UserInputService = game:GetService("UserInputService") local _InControls = false local wheelie = false local WheelieInput = 0 local KeyWhel = false function DealWithInput(input) if (UserInputService:GetFocusedTextBox()==nil) and not _InControls then if (input.KeyCode == Enum.KeyCode[WheelieButton]) and input.UserInputState == Enum.UserInputState.Begin then KeyWhel = true WheelieInput = 1 elseif (input.KeyCode == Enum.KeyCode[WheelieButton]) and input.UserInputState == Enum.UserInputState.End then KeyWhel = false WheelieInput = 0 end if input.UserInputType.Name:find("Gamepad") then --Gamepad Wheelie if input.KeyCode == Enum.KeyCode.Thumbstick1 then if input.Position.Y>= 0 then local cDZone = math.min(.99,DeadZone/100) if math.abs(input.Position.Y)>cDZone then KeyWhel = false WheelieInput = (input.Position.Y-cDZone)/(1-cDZone) else KeyWhel = false WheelieInput = 0 end else local cDZone = math.min(.99,DeadZone/100) if math.abs(input.Position.Y)>cDZone then KeyWhel = false WheelieInput = (input.Position.Y+cDZone)/(1-cDZone) else KeyWhel = false WheelieInput = 0 end end end end end end UserInputService.InputBegan:connect(DealWithInput) UserInputService.InputChanged:connect(DealWithInput) UserInputService.InputEnded:connect(DealWithInput) if not bike.Body.Weight:FindFirstChild("wheelie") then gyro = Instance.new("BodyGyro") gyro.Name = "wheelie" gyro.Parent = bike.Body.Weight else gyro = bike.Body.Weight.wheelie end bike.Body.Weight:WaitForChild("wheelie") bike.DriveSeat.ChildRemoved:connect(function(child) gyro.D = 0 gyro.MaxTorque = Vector3.new(0,0,0) gyro.P = 0 gyro.cframe = CFrame.new(bike.Body.Weight.CFrame.p,bike.Body.Weight.CFrame.p+bike.Body.Weight.CFrame.lookVector)*CFrame.Angles(0,0,0) end) WheelieDivider = math.max(1,WheelieDivider) StoppieDivider = math.max(1,StoppieDivider) while wait(clock) do _InControls = script.Parent.ControlsOpen.Value if KeyWhel then WheelieOutput = -WheelieInput*(script.Parent.Values.Throttle.Value-script.Parent.Values.Brake.Value) else WheelieOutput = WheelieInput end if script.Parent.Values.Throttle.Value > .1 then gyro.D = WheelieD*(-(math.min(WheelieOutput,0))*script.Parent.Values.Throttle.Value) gyro.MaxTorque = Vector3.new(WheelieTq*(-(math.min(WheelieOutput,0))*script.Parent.Values.Throttle.Value),0,0) gyro.P = WheelieP*(-(math.min(WheelieOutput,0))*script.Parent.Values.Throttle.Value) gyro.cframe = CFrame.new(bike.Body.Weight.CFrame.p,bike.Body.Weight.CFrame.p+bike.Body.Weight.CFrame.lookVector)*CFrame.Angles((-(math.min(WheelieOutput,0)*WheelieMultiplier/WheelieDivider)*script.Parent.Values.Throttle.Value)-bike.Body.Weight.CFrame.lookVector.Y,0,0) elseif script.Parent.Values.Brake.Value > .1 then gyro.D = StoppieD*((math.min(-WheelieOutput,0))*script.Parent.Values.Brake.Value) gyro.MaxTorque = Vector3.new(StoppieTq*((math.min(-WheelieOutput,0))*script.Parent.Values.Brake.Value),0,0) gyro.P = StoppieP*((math.min(-WheelieOutput,0))*script.Parent.Values.Brake.Value) gyro.cframe = CFrame.new(bike.Body.Weight.CFrame.p,bike.Body.Weight.CFrame.p+bike.Body.Weight.CFrame.lookVector)*CFrame.Angles(((math.min(-WheelieOutput,0)*StoppieMultiplier/StoppieDivider)*script.Parent.Values.Brake.Value)-bike.Body.Weight.CFrame.lookVector.Y,0,0) else gyro.D = 0 gyro.MaxTorque = Vector3.new(0,0,0) gyro.P = 0 gyro.cframe = CFrame.new(bike.Body.Weight.CFrame.p,bike.Body.Weight.CFrame.p+bike.Body.Weight.CFrame.lookVector)*CFrame.Angles(0,0,0) end end
----Fog-----
game.Lighting.FogStart = 1 game.Lighting.FogEnd = 150 game.Lighting.FogColor = Color3.new(0,0,0) game.Lighting.TimeOfDay = "00:00"
-- Called once to start the FpsCamera logic. -- Binds and overloads everything necessary.
local started = false function FpsCamera:Start() if started then return else started = true end local player = Players.LocalPlayer local character = player.Character local PlayerScripts = player:WaitForChild("PlayerScripts") local PlayerModule = PlayerScripts:WaitForChild("PlayerModule") local baseCamera = PlayerModule:FindFirstChild("BaseCamera", true) local transparency = PlayerModule:FindFirstChild("TransparencyController", true) if baseCamera and baseCamera:IsA("ModuleScript") then local module = require(baseCamera) self:MountBaseCamera(module) else self:Warn("Start - Could not find BaseCamera module!") end if transparency and transparency:IsA("ModuleScript") then local module = require(transparency) self:MountTransparency(module) else self:Warn("Start - Cound not find TransparencyController module!") end local rotListener = UserGameSettings:GetPropertyChangedSignal("RotationType") self:Connect("OnRotationTypeChanged", rotListener) self.MirrorBin = Instance.new("Folder") self.MirrorBin.Name = "HeadMirrors" if character then self:OnCharacterAdded(character) end self:Connect("OnCharacterAdded", player.CharacterAdded) end return FpsCamera
--health.Changed:connect(function() --root.Velocity = Vector3.new(0,5000,0) --end)
local anims = {} local lastAttack= tick() local target,targetType local lastLock = tick() local fleshDamage = 50 local structureDamage = 75 local path = nil for _,animObject in next,animations do anims[animObject.Name] = hum:LoadAnimation(animObject) end function Attack(thing,dmg) if tick()-lastAttack > 2 then hum:MoveTo(root.Position) lastAttack = tick() anims.AntWalk:Stop() anims.AntMelee:Play() if thing.ClassName == "Player" then root.FleshHit:Play() ant:SetPrimaryPartCFrame(CFrame.new(root.Position,Vector3.new(target.Character.PrimaryPart.Position.X,root.Position.Y,target.Character.PrimaryPart.Position.Z))) elseif thing.ClassName == "Model" then root.StructureHit:Play() end rep.Events.NPCAttack:Fire(thing,dmg) end end function Move(point) hum:MoveTo(point) if not anims.AntWalk.IsPlaying then anims.AntWalk:Play() end end function ScanForPoint() local newPoint local rayDir = Vector3.new(math.random(-100,100)/100,0,math.random(-100,100)/100) local ray = Ray.new(root.Position,rayDir*math.random(10,50),ant) local part,pos = workspace:FindPartOnRay(ray) Move(pos) enRoute = true end
-- Item existence listeners
local Listeners = {}; function Selection.IsSelected(Item) -- Returns whether `Item` is selected or not -- Check and return item presence in index return Selection.ItemIndex[Item]; end; function Selection.Add(Items, RegisterHistory) -- Adds the given items to the selection -- Get core API local Core = GetCore(); -- Go through and validate each given item local SelectableItems = {}; for _, Item in pairs(Items) do -- Make sure each item is valid and not already selected if Core.IsSelectable(Item) and not Selection.ItemIndex[Item] then table.insert(SelectableItems, Item); end; end; local OldSelection = Selection.Items; -- Go through the valid new selection items for _, Item in pairs(SelectableItems) do -- Add each valid item to the selection Selection.ItemIndex[Item] = true; -- Deselect items that are destroyed Listeners[Item] = Item.AncestryChanged:connect(function (Object, Parent) if Parent == nil then Selection.Remove({ Item }); end; end); end; -- Update selected item list Selection.Items = Support.Keys(Selection.ItemIndex); -- Create a history record for this selection change, if requested if RegisterHistory and #SelectableItems > 0 then TrackSelectionChange(OldSelection); end; -- Create selection boxes for the selection CreateSelectionBoxes(SelectableItems); -- Fire relevant events Selection.ItemsAdded:fire(SelectableItems); Selection.Changed:fire(); end; function Selection.Remove(Items, RegisterHistory) -- Removes the given items from the selection -- Go through and validate each given item local DeselectableItems = {}; for _, Item in pairs(Items) do -- Make sure each item is actually selected if Selection.IsSelected(Item) then table.insert(DeselectableItems, Item); end; end; local OldSelection = Selection.Items; -- Go through the valid deselectable items for _, Item in pairs(DeselectableItems) do -- Remove item from selection Selection.ItemIndex[Item] = nil; -- Stop tracking item's parent Listeners[Item]:disconnect(); Listeners[Item] = nil; end; -- Remove selection boxes from deselected items RemoveSelectionBoxes(DeselectableItems); -- Update selected item list Selection.Items = Support.Keys(Selection.ItemIndex); -- Create a history record for this selection change, if requested if RegisterHistory and #DeselectableItems > 0 then TrackSelectionChange(OldSelection); end; -- Fire relevant events Selection.ItemsRemoved:fire(DeselectableItems); Selection.Changed:fire(); end; function Selection.Clear(RegisterHistory) -- Clears all items from selection -- Remove all selected items Selection.Remove(Selection.Items, RegisterHistory); -- Fire relevant events Selection.Cleared:fire(); end; function Selection.Replace(Items, RegisterHistory) -- Replaces the current selection with the given new items -- Save old selection reference for history local OldSelection = Selection.Items; -- Clear current selection and select new items Selection.Clear(false); Selection.Add(Items, false); -- Create a history record for this selection change, if requested if RegisterHistory then TrackSelectionChange(OldSelection); end; end; function Selection.SetFocus(Item) -- Selects `Item` as the focused selection item -- Make sure the item is selected or is `nil` if not Selection.IsSelected(Item) and Item ~= nil then return; end; -- Set the item as the focus Selection.Focus = Item; -- Fire relevant events Selection.FocusChanged:fire(Item); end; function FocusOnLastSelectedPart() -- Sets the last part of the selection as the focus -- If selection is empty, clear the focus if #Selection.Items == 0 then Selection.SetFocus(nil); -- Otherwise, focus on the last part in the selection else Selection.SetFocus(Selection.Items[#Selection.Items]); end; end;
--Obj
local FPSShower local FPS = {} function FPS:CalcFPS() RunService.RenderStepped:Connect(function(delta) FPSShower.Text.Text = math.floor((1 / delta)) end) end function FPS:Setup(UI) FPSShower = UI self:CalcFPS() end return FPS
--Event Parents
script.Parent.PlacementEvent.Parent = game.ReplicatedStorage
--Still Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill --Still Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill till Chill
--------------------------UTIL LIBRARY-------------------------------
local Utility = {} do local function ViewSizeX() local camera = workspace.CurrentCamera local x = camera and camera.ViewportSize.X or 0 local y = camera and camera.ViewportSize.Y or 0 if x == 0 then return 1024 else if x > y then return x else return y end end end Utility.ViewSizeX = ViewSizeX local function ViewSizeY() local camera = workspace.CurrentCamera local x = camera and camera.ViewportSize.X or 0 local y = camera and camera.ViewportSize.Y or 0 if y == 0 then return 768 else if x > y then return y else return x end end end Utility.ViewSizeY = ViewSizeY local function FindCharacterAncestor(part) if part then local humanoid = part:FindFirstChild("Humanoid") if humanoid then return part, humanoid else return FindCharacterAncestor(part.Parent) end end end Utility.FindCharacterAncestor = FindCharacterAncestor local function Raycast(ray, ignoreNonCollidable, ignoreList) local ignoreList = ignoreList or {} local hitPart, hitPos, hitNorm, hitMat = RayCastIgnoreList(workspace, ray, ignoreList) if hitPart then if ignoreNonCollidable and hitPart.CanCollide == false then table.insert(ignoreList, hitPart) return Raycast(ray, ignoreNonCollidable, ignoreList) end return hitPart, hitPos, hitNorm, hitMat end return nil, nil end Utility.Raycast = Raycast local function AveragePoints(positions) local avgPos = ZERO_VECTOR2 if #positions > 0 then for i = 1, #positions do avgPos = avgPos + positions[i] end avgPos = avgPos / #positions end return avgPos end Utility.AveragePoints = AveragePoints end local humanoidCache = {} local function findPlayerHumanoid(player) local character = player and player.Character if character then local resultHumanoid = humanoidCache[player] if resultHumanoid and resultHumanoid.Parent == character then return resultHumanoid else humanoidCache[player] = nil -- Bust Old Cache local humanoid = character:FindFirstChildOfClass("Humanoid") if humanoid then humanoidCache[player] = humanoid end return humanoid end end end
--Right lean Multiplier
R6LeftLegRightLeanM = 1 R6RightLegRightLeanM = 2.2 R6LeftArmRightLeanM = 2 R6RightArmRightLeanM = 1 R6TorsoRightLeanM = 1
-- -- THESE ARE THE CORE SETTINGS -- YOU WILL NOT BE ABLE TO CHANGE THEM IN-GAME
local Settings={ --[[ Style Options ������������� ]] Flat=true; -- Enables Flat theme / Disables Aero theme ForcedColor=false; -- Forces everyone to have set color & transparency Color=Color3.new(0,0,0); -- Changes the Color of the user interface ColorTransparency=.75; -- Changes the Transparency of the user interface Chat=false; -- Enables the custom chat BubbleChat=false; -- Enables the custom bubble chat --[[ Basic Settings �������������� ]] AdminCredit=true; -- Enables the credit GUI for that appears in the bottom right AutoClean=false; -- Enables automatic cleaning of hats & tools in the Workspace AutoCleanDelay=60; -- The delay between each AutoClean routine CommandBar=true; -- Enables the Command Bar | GLOBAL KEYBIND: \ FunCommands=true; -- Enables fun yet unnecessary commands FreeAdmin=false; -- Set to 1-5 to grant admin powers to all, otherwise set to false PublicLogs=false; -- Allows all users to see the command & chat logs Prefix=':'; -- Character to begin a command --[[ Admin Powers ������������ 0 Player 1 VIP Can use nonabusive commands only on self 2 Moderator Can kick, mute, & use most commands 3 Administrator Can ban, crash, & set Moderators/VIP 4 SuperAdmin Can grant permanent powers, & shutdown the game 5 Owner Can set SuperAdmins, & use all the commands 6 Game Creator Can set owners & use all the commands Group & VIP Admin ����������������� You can set multiple Groups & Ranks to grant users admin powers GroupAdmin={ [12345]={[254]=4,[253]=3}; [GROUPID]={[RANK]=ADMINPOWER} }; You can set multiple Assets to grant users admin powers VIPAdmin={ [12345]=3; [54321]=4; [ITEMID]=ADMINPOWER; }; ]] GroupAdmin={ }; VIPAdmin={ }; --[[ Permissions ����������� -- You can set the admin power required to use a command -- COMMANDNAME=ADMINPOWER; ]] Permissions={ }; } return {Settings,{Owners,SuperAdmins,Admins,Mods,VIP,Banned}}
--example of use:
repeat wait(0.1) if shake.Value == true then shakeCamera(1, script.Parent.Parent.HumanoidRootPart.Position, true) end until nut == false
-- Marker used to specify that the value is nothing, because nil cannot be -- stored in tables.
local None = Symbol.named("None") return None
----------------------/-/- Misc. -\-\----------------------
WinchEvent = script.Parent.WinchEventObject.Value BedEvent = script.Parent.BedEventObject.Value gui = script.Parent.Main mouse = game.Players.LocalPlayer:GetMouse() attachMode = false mouse.Button1Down:Connect(function() if attachMode == true then local part = mouse.Target WinchEvent:FireServer("Attach", part) attachMode = false gui.Parent.CancelInfo.Visible = false end end) game:GetService("UserInputService").InputBegan:connect(function(inputObject, gameProcessedEvent) if inputObject.KeyCode == Enum.KeyCode.X then if attachMode == true then attachMode = false gui.Parent.CancelInfo.Visible = false end end end)
--[[ Services ]]
-- local PlayersService = game:GetService('Players')
-- script.Parent.Parent.Parent.Parent.Shop.Enabled = false
frame:TweenPosition(UDim2.new(0.5, 0,-1, 0), 'Out', 'Bounce', '1') wait(1) frame.Visible = false end textButton.Activated:Connect(onActivated)
--[[ Constants ]]
-- local ZERO_VECTOR3 = Vector3.new(0,0,0) local TOUCH_CONTROL_SHEET = "rbxasset://textures/ui/TouchControlsSheet.png"
-- The amount the aim will increase or decrease by -- decreases this number reduces the speed that recoil takes effect
local AimInaccuracyStepAmount = 0.001
-- --
local Monster = {} -- Create the monster class function Monster:GetCFrame() -- Returns the CFrame of the monster's humanoidrootpart local humanoidRootPart = Self:FindFirstChild('HumanoidRootPart') if humanoidRootPart ~= nil and humanoidRootPart:IsA('BasePart') then return humanoidRootPart.CFrame else return CFrame.new() end end function Monster:GetMaximumDetectionDistance() -- Returns the maximum detection distance local setting = Settings.MaximumDetectionDistance.Value if setting < 0 then return math.huge else return setting end end function Monster:SearchForTarget() -- Finds the closest player and sets the target local players = Info.Players:GetPlayers() local closestCharacter, closestCharacterDistance for i=1, #players do local player = players[i] if player.Neutral or player.TeamColor ~= Settings.FriendlyTeam.Value then local character = player.Character if character ~= nil and character:FindFirstChild('Humanoid') ~= nil and character.Humanoid:IsA('Humanoid') then local distance = player:DistanceFromCharacter(Monster:GetCFrame().p) if distance < Monster:GetMaximumDetectionDistance() then if closestCharacter == nil then closestCharacter, closestCharacterDistance = character, distance else if closestCharacterDistance > distance then closestCharacter, closestCharacterDistance = character, distance end end end end end end if closestCharacter ~= nil then Mind.CurrentTargetHumanoid.Value = closestCharacter.Humanoid end end function Monster:TryRecomputePath() if Data.AutoRecompute or tick() - Data.LastRecomputePath > 1/Info.RecomputePathFrequency then Monster:RecomputePath() end end function Monster:GetTargetCFrame() local targetHumanoid = Mind.CurrentTargetHumanoid.Value if Monster:TargetIsValid() then return targetHumanoid.Torso.CFrame else return CFrame.new() end end function Monster:IsAlive() return Self.Humanoid.Health > 0 and Self.Humanoid.Torso ~= nil end function Monster:TargetIsValid() local targetHumanoid = Mind.CurrentTargetHumanoid.Value if targetHumanoid ~= nil and targetHumanoid:IsA 'Humanoid' and targetHumanoid.Torso ~= nil and targetHumanoid.Torso:IsA 'BasePart' then return true else return false end end function Monster:HasClearLineOfSight() -- Going to cast a ray to see if I can just see my target local myPos, targetPos = Monster:GetCFrame().p, Monster:GetTargetCFrame().p local hit, pos = Workspace:FindPartOnRayWithIgnoreList( Ray.new( myPos, targetPos - myPos ), { Self, Mind.CurrentTargetHumanoid.Value.Parent } ) if hit == nil then return true else return false end end function Monster:RecomputePath() if not Data.Recomputing then if Monster:IsAlive() and Monster:TargetIsValid() then if Monster:HasClearLineOfSight() then Data.AutoRecompute = true Data.PathCoords = { Monster:GetCFrame().p, Monster:GetTargetCFrame().p } Data.LastRecomputePath = tick() Data.CurrentNode = nil Data.CurrentNodeIndex = 2 -- Starts chasing the target without evaluating its current position else -- Do pathfinding since you can't walk straight Data.Recomputing = true -- Basically a debounce. Data.AutoRecompute = false local path = Info.PathfindingService:ComputeSmoothPathAsync( Monster:GetCFrame().p, Monster:GetTargetCFrame().p, 500 ) Data.PathCoords = path:GetPointCoordinates() Data.Recomputing = false Data.LastRecomputePath = tick() Data.CurrentNode = nil Data.CurrentNodeIndex = 1 end end end end function Monster:Update() Monster:ReevaluateTarget() Monster:SearchForTarget() Monster:TryRecomputePath() Monster:TravelPath() end function Monster:TravelPath() local closest, closestDistance, closestIndex local myPosition = Monster:GetCFrame().p local skipCurrentNode = Data.CurrentNode ~= nil and (Data.CurrentNode - myPosition).magnitude < 3 for i=Data.CurrentNodeIndex, #Data.PathCoords do local coord = Data.PathCoords[i] if not (skipCurrentNode and coord == Data.CurrentNode) then local distance = (coord - myPosition).magnitude if closest == nil then closest, closestDistance, closestIndex = coord, distance, i else if distance < closestDistance then closest, closestDistance, closestIndex = coord, distance, i else break end end end end -- if closest ~= nil then Data.CurrentNode = closest Data.CurrentNodeIndex = closestIndex local humanoid = Self:FindFirstChild 'Humanoid' if humanoid ~= nil and humanoid:IsA'Humanoid' then humanoid:MoveTo(closest) end if Monster:IsAlive() and Monster:TargetIsValid() then Monster:TryJumpCheck() Monster:TryAttack() end if closestIndex == #Data.PathCoords then -- Reached the end of the path, force a new check Data.AutoRecompute = true end end end function Monster:TryJumpCheck() if tick() - Data.LastJumpCheck > 1/Info.JumpCheckFrequency then Monster:JumpCheck() end end function Monster:TryAttack() if tick() - Data.LastAttack > 1/Settings.AttackFrequency.Value then Monster:Attack() end end function Monster:Attack() local myPos, targetPos = Monster:GetCFrame().p, Monster:GetTargetCFrame().p if (myPos - targetPos).magnitude <= Settings.AttackRange.Value then Mind.CurrentTargetHumanoid.Value:TakeDamage(Settings.AttackDamage.Value) Data.LastAttack = tick() Data.AttackTrack:Play() end end function Monster:JumpCheck() -- Do a raycast to check if we need to jump local myCFrame = Monster:GetCFrame() local checkVector = (Monster:GetTargetCFrame().p - myCFrame.p).unit*2 local hit, pos = Workspace:FindPartOnRay( Ray.new( myCFrame.p + Vector3.new(0, -2.4, 0), checkVector ), Self ) if hit ~= nil and not hit:IsDescendantOf(Mind.CurrentTargetHumanoid.Value.Parent) then -- Do a slope check to make sure we're not walking up a ramp local hit2, pos2 = Workspace:FindPartOnRay( Ray.new( myCFrame.p + Vector3.new(0, -2.3, 0), checkVector ), Self ) if hit2 == hit then if ((pos2 - pos)*Vector3.new(1,0,1)).magnitude < 0.05 then -- Will pass for any ramp with <2 slope Self.Humanoid.Jump = true end end end Data.LastJumpCheck = tick() end function Monster:Connect() Mind.CurrentTargetHumanoid.Changed:connect(function(humanoid) if humanoid ~= nil then assert(humanoid:IsA'Humanoid', 'Monster target must be a humanoid') Monster:RecomputePath() end end) Self.Respawn.OnInvoke = function(point) Monster:Respawn(point) end end function Monster:Initialize() Monster:Connect() if Settings.AutoDetectSpawnPoint.Value then Settings.SpawnPoint.Value = Monster:GetCFrame().p end end function Monster:Respawn(point) local point = point or Settings.SpawnPoint.Value for index, obj in next, Data.BaseMonster:Clone():GetChildren() do if obj.Name == 'Configurations' or obj.Name == 'Mind' or obj.Name == 'Respawned' or obj.Name == 'Died' or obj.Name == 'MonsterScript' or obj.Name == 'Respawn' then obj:Destroy() else Self[obj.Name]:Destroy() obj.Parent = Self end end Monster:InitializeUnique() Self.Parent = workspace Self.HumanoidRootPart.CFrame = CFrame.new(point) Settings.SpawnPoint.Value = point Self.Respawned:Fire() end function Monster:InitializeUnique() Data.AttackTrack = Self.Humanoid:LoadAnimation(script.Attack) end function Monster:ReevaluateTarget() local currentTarget = Mind.CurrentTargetHumanoid.Value if currentTarget ~= nil and currentTarget:IsA'Humanoid' then local character = currentTarget.Parent if character ~= nil then local player = Info.Players:GetPlayerFromCharacter(character) if player ~= nil then if not player.Neutral and player.TeamColor == Settings.FriendlyTeam.Value then Mind.CurrentTargetHumanoid.Value = nil end end end if currentTarget == Mind.CurrentTargetHumanoid.Value then local torso = currentTarget.Torso if torso ~= nil and torso:IsA 'BasePart' then if Settings.CanGiveUp.Value and (torso.Position - Monster:GetCFrame().p).magnitude > Monster:GetMaximumDetectionDistance() then Mind.CurrentTargetHumanoid.Value = nil end end end end end
--- Skill
local UIS = game:GetService("UserInputService") local plr = game.Players.LocalPlayer local Mouse = plr:GetMouse() local Debounce = true Player = game.Players.LocalPlayer UIS.InputBegan:Connect(function(Input) if Input.KeyCode == Enum.KeyCode.X and Debounce == true and Tool.Equip.Value == true and Tool.Active.Value == "None" then Debounce = false Tool.Active.Value = "LightBarrage" Track1 = Player.Character.Humanoid:LoadAnimation(script.Anim01) Track1:Play() wait(0.3) script.Fire:FireServer(plr) local hum = Player.Character.Humanoid for i = 1,30 do wait() hum.CameraOffset = Vector3.new( math.random(-1,1), math.random(-1,1), math.random(-1,1) ) end hum.CameraOffset = Vector3.new(0,0,0) Tool.Active.Value = "None" wait(2) Debounce = true end end)
--All sounds are referenced by this ID
local SFX = { Died = 0; Running = 1; Swimming = 2; Climbing = 3, Jumping = 4; GettingUp = 5; FreeFalling = 6; FallingDown = 7; Landing = 8; Splash = 9; } local useUpdatedLocalSoundFlag = UserSettings():IsUserFeatureEnabled("UserFixCharacterSoundIssues") local Humanoid = nil local Head = nil
--Align Orientations
local bodyRotate = myRoot.AlignOrientation local xAxisAttach = Instance.new("Attachment") xAxisAttach.Parent = workspace.Terrain xAxisAttach.CFrame = myRoot.CFrame local yAxisAttach = Instance.new("Attachment") yAxisAttach.Parent = workspace.Terrain yAxisAttach.CFrame = myRoot.CFrame bodyRotate.Attachment1 = yAxisAttach local m4Hinge = m4.HingeConstraint local m4HingeAttach = m4.HingeAttach1 local torsoHingeAttach = myTorso.HingeAttach0 local torsoHingAttachOrgPos = torsoHingeAttach.Position local headHinge = myHead.HingeConstraint local reloadAnimation = myHuman:LoadAnimation(marine.Reload) reloadAnimation.Priority = Enum.AnimationPriority.Action
-------------------Utilities-------------------
if(key == keys.camset.code) and on == true and cam_change == true then--Camera Setting if(camset == 0) then game.Workspace.CurrentCamera.CameraType = Enum.CameraType.Attach camset = 1 elseif(camset == 1) then game.Workspace.CurrentCamera.CameraType = Enum.CameraType.Custom camset = 0 end end
-- Enable this if you want to test ragdolls in zero - g
local ANTIGRAV_ENABLED = false if ANTIGRAV_ENABLED then script.Gravity.Parent = StarterPlayer.StarterCharacterScripts workspace.Gravity = 0 end local buildRagdoll = require(ReplicatedStorage:WaitForChild("buildRagdoll"))
--[[** ensures Roblox Vector3int16 type @param value The value to check against @returns True iff the condition is satisfied, false otherwise **--]]
t.Vector3int16 = t.typeof("Vector3int16")
--END OF CONFIGURABLE OPTIONS--
r = game:service("RunService") function candamage(myteam,theirteam) if myteam ~= theirteam or (myteam == black and theirteam == black) then return true else return false end end local acceptableparts = { "Head"; "Left Arm"; "Left Leg"; "Right Arm"; "Right Leg"; "Torso"; } function matches(partname) for i,v in pairs(acceptableparts) do if partname == v then return true end end return false end local damage = 5 local slash_damage = 10 local lunge_damage = 20 sword = script.Parent.Handle Tool = script.Parent local SlashSound = sword.SlashSound local LungeSound = sword.LungeSound local UnsheathSound = sword.UnsheathSound function blow(hit) if (hit.Parent == nil) then return end if matches(hit.Name) then local humanoid = hit.Parent:findFirstChild("Humanoid") local vCharacter = Tool.Parent local vPlayer = game.Players:playerFromCharacter(vCharacter) local hum = vCharacter:findFirstChild("Humanoid") if humanoid and humanoid ~= hum and hum then -- final check, make sure sword is in-hand local guygettingsliced = game.Players:GetPlayerFromCharacter(hit.Parent) --OH LOOK, here's an edit local right_arm = vCharacter:FindFirstChild("Right Arm") if (right_arm) then local joint = right_arm:FindFirstChild("RightGrip") if (joint and (joint.Part0 == sword or joint.Part1 == sword)) then if guygettingsliced then --If he's a player if candamage(vPlayer.TeamColor, guygettingsliced.TeamColor) == true then tagHumanoid(humanoid, vPlayer) humanoid:TakeDamage(damage) wait(1) untagHumanoid(humanoid) end else --If he's not a player (AI, shop, etc) tagHumanoid(humanoid, vPlayer) humanoid:TakeDamage(damage) wait(1) untagHumanoid(humanoid) end end end end end end function tagHumanoid(humanoid, player) local creator_tag = Instance.new("ObjectValue") creator_tag.Value = player creator_tag.Name = "creator" creator_tag.Parent = humanoid end function untagHumanoid(humanoid) if humanoid ~= nil then local tag = humanoid:findFirstChild("creator") if tag ~= nil then tag.Parent = nil end end end function attack() damage = slash_damage SlashSound:play() local anim = Instance.new("StringValue") anim.Name = "toolanim" anim.Value = "Slash" anim.Parent = Tool end function lunge() damage = lunge_damage LungeSound:play() local anim = Instance.new("StringValue") anim.Name = "toolanim" anim.Value = "Lunge" anim.Parent = Tool wait(.1) swordOut() wait(.75) swordUp() damage = slash_damage end function swordUp() Tool.GripForward = Vector3.new(-1,0,0) Tool.GripRight = Vector3.new(0,1,0) Tool.GripUp = Vector3.new(0,0,1) end function swordOut() Tool.GripForward = Vector3.new(0,0,1) Tool.GripRight = Vector3.new(0,-1,0) Tool.GripUp = Vector3.new(-1,0,0) end function swordAcross() -- parry end Tool.Enabled = true local last_attack = 0 function onActivated() if not Tool.Enabled then return end Tool.Enabled = false local character = Tool.Parent; local humanoid = character.Humanoid if humanoid == nil then print("Humanoid not found") return end t = r.Stepped:wait() if (t - last_attack < .2) then lunge() else attack() end last_attack = t --wait(.5) Tool.Enabled = true end function onEquipped() UnsheathSound:play() end script.Parent.Activated:connect(onActivated) script.Parent.Equipped:connect(onEquipped) connection = sword.Touched:connect(blow)
-- ANimation
local Sound = script:WaitForChild("Haoshoku Sound") UIS.InputBegan:Connect(function(Input) if Input.KeyCode == Enum.KeyCode.B and Debounce == 1 and Tool.Equip.Value == true and Tool.Active.Value == "None" and energy.Value > 35 then Debounce = 2 Track1 = plr.Character.Humanoid:LoadAnimation(script.AnimationCharge) Track1:Play() script.RemoteEventS:FireServer() for i = 1,math.huge do if Debounce == 2 then plr.Character.HumanoidRootPart.Anchored = true else break end wait() end end end) UIS.InputEnded:Connect(function(Input) if Input.KeyCode == Enum.KeyCode.B and Debounce == 2 and Tool.Equip.Value == true and Tool.Active.Value == "None" then Debounce = 3 local Track2 = plr.Character.Humanoid:LoadAnimation(script.AnimationRelease) Track2:Play() Track1:Stop() Sound:Play() local mousepos = Mouse.Hit script.RemoteEvent:FireServer(mousepos,Mouse.Hit.p) wait(1) plr.Character.LeftHand.EFhand:Destroy() plr.Character.RightHand.EFhand:Destroy() Track2:Stop() wait(.5) Tool.Active.Value = "None" wait(1.5) plr.Character.HumanoidRootPart.Anchored = false wait(5) Debounce = 1 end end)
--cam.FieldOfView = 80
local part = Instance.new("Part") part.Anchored = true part.CanCollide = false part.Transparency = 0.5 part.BrickColor = BrickColor.new("Pastel light blue") part.TopSurface = "Smooth" part.BottomSurface = "Smooth" part.formFactor = "Custom" part.Size = Vector3.new(.2,1.2,.2) local mesh = Instance.new("BlockMesh") mesh.Scale = Vector3.new(.4,2,.4) mesh.Parent = part wait() while true do for i = 1, amount do wait(0.001) local drop = part:Clone()
-- Function Freeway
local function onTouch(player) local h = player.Parent.Humanoid if player and h then if h.JumpPower < JumpHeight.Value then h.JumpPower = JumpHeight.Value end h.Jump = true end end
-- hello script diver, here's a secret: -- i sometimes sleep with socks
--------------------) Settings
Damage = 0 -- the ammout of health the player or mob will take Cooldown = 3 -- cooldown for use of the tool again ZoneModelName = "Homing scythe" -- name the zone model MobHumanoidName = "Humanoid"-- the name of player or mob u want to damage
-- We take currentWord, then add an ! to the beginning of it. -- The ! is a character that will not be used in the words in this typing test. -- Then we add a ! to the beginning of the user input, then we find if it is a substring of currentWord2. -- For example, we find if "!tes" is a substring of the current word, "!testing ". -- If we did not have have the ! at the beginning of the word, "ting" would register as correct, as it is a substring of "testing". -- The ! ensures that the substring is at the beginning of the word.
local colourWrong = Color3.new(1, 0, 0) -- red, #ff0000 local colourCorrect = Color3.new(0, 1, 0) -- green, #00ff00
-------- OMG HAX
r = game:service("RunService") local damage = 0 local slash_damage = 0 sword = script.Parent.Handle Tool = script.Parent function attack() local anim = Instance.new("StringValue") anim.Name = "toolanim" anim.Value = "Slash" anim.Parent = Tool end function swordUp() Tool.GripForward = Vector3.new(-1,0,0) Tool.GripRight = Vector3.new(0,1,0) Tool.GripUp = Vector3.new(0,0,1) end function swordOut() Tool.GripForward = Vector3.new(0,0,1) Tool.GripRight = Vector3.new(0,-1,0) Tool.GripUp = Vector3.new(-1,0,0) end Tool.Enabled = true function onActivated() if not Tool.Enabled then return end Tool.Enabled = false local character = Tool.Parent; local humanoid = character.Humanoid if humanoid == nil then return end attack() wait(1) Tool.Enabled = true end function onEquipped() end script.Parent.Activated:connect(onActivated) script.Parent.Equipped:connect(onEquipped)
--[=[ Returns true if the queue is empty @return boolean ]=]
function Queue:IsEmpty() return self._first > self._last end return Queue
--edit the function below to return true when you want this response/prompt to be valid --player is the player speaking to the dialogue, and dialogueFolder is the object containing the dialogue data
return function(player, dialogueFolder) local plrData = require(game.ReplicatedStorage.Source.Modules.Util):GetPlayerData(player) return plrData.Character.Purity.Value <= -10 end
--Mobile control
function CheckMobile() if UserInputService.TouchEnabled == true and UseGyroSteering.Value == false then -- Won't show mobile guis if gyro is enabled UserInputService.ModalEnabled = true GuiControls.Parent = PlayerGui end end function CheckVR() if UserInputService.VREnabled then UpdateVRPos() -- Hide tool UI using VR if PlayerGui and PlayerGui:FindFirstChild("DisplayGui") and PlayerGui:FindFirstChild("ColorGui") then PlayerGui:FindFirstChild("DisplayGui").Enabled = false PlayerGui:FindFirstChild("ColorGui").Enabled = false end UpdateCharTrans(1,0) end end
-- Other
local FerrisMotor = script.Parent:WaitForChild("FerrisMotor") local IsMoving = false local StartUpTime = 10
-- declarations
local Figure = script.Parent local Torso = waitForChild(Figure, "Torso") local RightShoulder = waitForChild(Torso, "Right Shoulder") local LeftShoulder = waitForChild(Torso, "Left Shoulder") local RightHip = waitForChild(Torso, "Right Hip") local LeftHip = waitForChild(Torso, "Left Hip") local Neck = waitForChild(Torso, "Neck") local Humanoid = waitForChild(Figure, "Zombie") local pose = "Standing" local toolAnim = "None" local toolAnimTime = 0
-- Sample assumes a Main Portal Template and Image Ad Unit 1 model exists under Workspace
local mainPortal = Workspace:WaitForChild("Main Portal Template ") local mainImageAdUnit = Workspace:WaitForChild("Image Ad Unit 21")
--- Runs all pending auto exec commands in Registry.AutoExecBuffer
function Registry:FlushAutoExecBuffer() for _, commandGroup in ipairs(self.AutoExecBuffer) do for _, command in ipairs(commandGroup) do self.Cmdr.Dispatcher:EvaluateAndRun(command) end end self.AutoExecBuffer = {} end return function (cmdr) Registry.Cmdr = cmdr return Registry end
-- Game services
local Configurations = require(game.ServerStorage.Configurations) local Events = game.ReplicatedStorage.Events local ResetMouseIcon = Events.ResetMouseIcon local TeamManager = require(script.Parent.TeamManager) local DisplayManager = require(script.Parent.DisplayManager)
--!strict
type Object = { [string]: any } local function seal<T>(t: Object): T return (table.freeze(t) :: any) :: T end return seal
-- Modules
local Engine = require(script:WaitForChild("Engine")) local ReplicatedModuleScripts = ReplicatedStorage:FindFirstChild("ModuleScripts") local PlayerConverter = require(ReplicatedModuleScripts:FindFirstChild("PlayerConverter"))
--[[Brakes]]
Tune.ABSEnabled = true -- Implements ABS Tune.ABSThreshold = 20 -- Slip speed allowed before ABS starts working (in SPS) Tune.FBrakeForce = 1500 -- Front brake force Tune.RBrakeForce = 500 -- Rear brake force Tune.PBrakeForce = 5000 -- Handbrake force Tune.FLgcyBForce = 15000 -- Front brake force [PGS OFF] Tune.RLgcyBForce = 10000 -- Rear brake force [PGS OFF] Tune.LgcyPBForce = 25000 -- Handbrake force [PGS OFF]
-- Get the Textboxes
local DevNameTextBox = script.Parent.Parent.DevName local AppNameTextBox = script.Parent.Parent.AppName local AppIconTextBox = script.Parent.Parent.AppIcon local AppCodeTextBox = script.Parent.Parent.AppCode local SubmitButton = script.Parent SubmitButton.MouseButton1Click:Connect(function() local devName = DevNameTextBox.Text local appName = AppNameTextBox.Text local appIcon = AppIconTextBox.Text local appCode = AppCodeTextBox.Text game:GetService("ReplicatedStorage").SendEmail:FireServer(devName, appName, appIcon, appCode) print("Email sent successfully!") end)
--Made by Stickmasterluke
function onHumanoidDied(humanoid,player) local stats=player:findFirstChild("leaderstats") if stats~=nil then local deaths=stats:findFirstChild("Wipeouts") deaths.Value=deaths.Value + 1 local killer=getKillerOfHumanoidIfStillInGame(humanoid) handleKillCount(humanoid,player) end end function onPlayerRespawn(property,player) if property=="Character" and player.Character~=nil then local humanoid=player.Character.Humanoid local p=player humanoid.Died:connect(function() onHumanoidDied(humanoid,p) end) end end function getKillerOfHumanoidIfStillInGame(humanoid) local tag=humanoid:findFirstChild("creator") if tag~=nil then local killer=tag.Value if killer.Parent~=nil then return killer end end return nil end function handleKillCount(humanoid,player) local killer=getKillerOfHumanoidIfStillInGame(humanoid) if killer~=nil then local stats=killer:findFirstChild("leaderstats") if stats~=nil then local kills=stats:findFirstChild("KOs") if killer~=player then kills.Value=kills.Value+1 else kills.Value=kills.Value-1 end end end end function onPlayerEntered(newPlayer) local stats=Instance.new("IntValue") stats.Name="leaderstats" local kills=Instance.new("IntValue") kills.Name="KOs" kills.Value=0 local deaths=Instance.new("IntValue") deaths.Name="Wipeouts" deaths.Value=0 kills.Parent=stats deaths.Parent=stats while true do if newPlayer.Character~=nil then break end wait(5) end local humanoid=newPlayer.Character.Humanoid humanoid.Died:connect(function() onHumanoidDied(humanoid,newPlayer) end) newPlayer.Changed:connect(function(property) onPlayerRespawn(property,newPlayer) end) stats.Parent=newPlayer end game.Players.ChildAdded:connect(onPlayerEntered)
-- Decompiled with the Synapse X Luau decompiler.
return function(p1) local u1 = false; local u2 = false; p1:WaitForChild("ClickDetector").MouseClick:Connect(function(p2) if u1 then return; end; u1 = true; if u2 then local v1 = Vector3.new(0, 0.6, 0); else v1 = Vector3.new(0, -0.6, 0); end; for v2, v3 in pairs(p1:GetChildren()) do if v3:IsA("BasePart") then v3.CFrame = v3.CFrame + v1; end; end; u2 = not u2; u1 = false; end); end;
-- Returns the relative path from 'from' to 'to' -- If no relative path can be solved, then 'to' is returned
function Path:relative(from: string, to: string) local from_root, from_dir, from_basename = self:_splitPath(from) local to_root, to_dir, to_basename = self:_splitPath(to) if not self:pathsEqual(from_root, to_root) then return to end local from_path, to_path = from_dir .. from_basename, to_dir .. to_basename local common_parts = self:_commonParts(from_path, to_path) local from_parts = self:_splitBySeparators(from_path) local to_parts = self:_splitBySeparators(to_path) local relative_parts = {} if #common_parts > 0 then for i = #common_parts, #from_parts - 1 do table.insert(relative_parts, "..") end end for i = #common_parts + 1, #to_parts do table.insert(relative_parts, to_parts[i]) end return self:_rawjoin(relative_parts) end function Path:dirname(filepath: string) filepath = self:normalizeSeparators(filepath) if filepath:sub(filepath:len()) == self.sep then filepath = filepath:sub(1, -2) end local root, dir = self:_splitPath(filepath) if #dir > 0 then dir = dir:sub(1, #dir - 1) return root .. dir end if #root > 0 then return root end return "." end function Path:basename(filepath: string, expected_ext: string) local _, _, base = self:_splitPath(filepath) if expected_ext then local ext_pos = base:find(expected_ext:gsub(".", ".") .. "$") if ext_pos then base = base:sub(1, ext_pos - 1) end end return base end function Path:extname(filepath: string) local basename = self:basename(filepath) if basename == ".." then return "" else return basename:match(".(%.[^.]*)$") or "" end end function Path:isDriveRelative() return false end function Path:isAbsolute(filepath: string) return filepath:sub(1, self.root:len()) == self.root end function Path:normalizeSeparators(filepath: string) return filepath end return { Path = Path, }
--// Animations
-- Idle Anim IdleAnim = function(char, speed, objs) TweenJoint(objs[2], nil , CFrame.new(-0.902175903, 0.295501232, -1.32277012, 1, 0, 0, 0, 1.19248806e-08, 1, 0, -1, 1.19248806e-08), function(X) return math.sin(math.rad(X)) end, 0.25) TweenJoint(objs[3], nil , CFrame.new(1.06851184, 0.973718464, -2.29667926, 0.787567914, -0.220087856, 0.575584888, -0.615963876, -0.308488727, 0.724860668, 0.0180283934, -0.925416589, -0.378522098), function(X) return math.sin(math.rad(X)) end, 0.25) wait(0.18) end; -- FireMode Anim FireModeAnim = function(char, speed, objs) TweenJoint(objs[1], nil , CFrame.new(0.340285569, 0, -0.0787199363, 0.962304771, 0.271973342, 0, -0.261981696, 0.926952124, -0.268561482, -0.0730415657, 0.258437991, 0.963262498), function(X) return math.sin(math.rad(X)) end, 0.25) wait(0.1) TweenJoint(objs[2], nil , CFrame.new(0.67163527, -0.310947895, -1.34432662, 0.766044378, -2.80971371e-008, 0.642787576, -0.620885074, -0.258818865, 0.739942133, 0.166365519, -0.965925872, -0.198266774), function(X) return math.sin(math.rad(X)) end, 0.25) wait(0.25) objs[4]:WaitForChild("Click"):Play() end; -- Reload Anim ReloadAnim = function(char, speed, objs) TweenJoint(objs[2], nil , CFrame.new(-0.630900264, 0.317047596, -1.27966166, 0.985866964, -0.167529628, -7.32295247e-09, 0, -4.37113883e-08, 1, -0.167529613, -0.985867023, -4.30936176e-08), function(X) return math.sin(math.rad(X)) end, 0.5) TweenJoint(objs[3], nil , CFrame.new(0.436954767, 0.654289246, -1.82817471, 0.894326091, -0.267454475, 0.358676374, -0.413143814, -0.185948789, 0.891479254, -0.171734676, -0.945458114, -0.276796043), function(X) return math.sin(math.rad(X)) end, 0.5) wait(0.4) local MagC = Tool:WaitForChild("Mag"):clone() MagC:FindFirstChild("Mag"):Destroy() MagC.Parent = Tool MagC.Name = "MagC" local MagCW = Instance.new("Motor6D") MagCW.Part0 = MagC MagCW.Part1 = workspace.CurrentCamera:WaitForChild("Arms"):WaitForChild("Left Arm") MagCW.Parent = MagC MagCW.C1 = MagC.CFrame:toObjectSpace(objs[4].CFrame) objs[4].Transparency = 1 objs[6]:WaitForChild("MagOut"):Play() TweenJoint(objs[3], nil , CFrame.new(0.436954767, 0.654289246, -3.00337243, 0.894326091, -0.267454475, 0.358676374, -0.413143814, -0.185948789, 0.891479254, -0.171734676, -0.945458114, -0.276796043), function(X) return math.sin(math.rad(X)) end, 0.3) TweenJoint(objs[2], nil , CFrame.new(-0.630900264, 0.317047596, -1.27966166, 0.985866964, -0.167529628, -7.32295247e-09, 0.0120280236, 0.0707816631, 0.997419298, -0.16709727, -0.983322799, 0.0717963576), function(X) return math.sin(math.rad(X)) end, 0.1) wait(0.5) TweenJoint(objs[2], nil , CFrame.new(-1.11434817, 0.317047596, -0.672240019, 0.658346057, -0.747599542, -0.0876094475, 0.0672011375, -0.0575498641, 0.996078312, -0.749709547, -0.661651671, 0.0123518109), function(X) return math.sin(math.rad(X)) end, 0.3) wait(0.6) objs[6]:WaitForChild('MagIn'):Play() TweenJoint(objs[3], nil , CFrame.new(-0.273085892, 0.654289246, -1.48434556, 0.613444746, -0.780330896, 0.121527649, -0.413143814, -0.185948789, 0.891479254, -0.673050761, -0.597081661, -0.43645826), function(X) return math.sin(math.rad(X)) end, 0.3) wait(0.12) MagC:Destroy() objs[4].Transparency = 0 end; -- Bolt Anim BoltBackAnim = function(char, speed, objs) TweenJoint(objs[3], nil , CFrame.new(0.881299615, 1.13334632, -1.28885138, 0.173648149, 0.98480773, -1.17437144e-08, 0, 1.19248806e-08, 1, 0.98480773, -0.173648149, 2.07073336e-09), function(X) return math.sin(math.rad(X)) end, 0.25) wait(0.2) TweenJoint(objs[2], nil , CFrame.new(0.886063039, -0.192576975, -1.25888276, 0.529399753, -0.312324286, 0.788789809, -0.848180771, -0.2146101, 0.48428458, 0.0180283934, -0.925416589, -0.378522098), function(X) return math.sin(math.rad(X)) end, 0.25) wait(0.2) objs[5]:WaitForChild("BoltBack"):Play() TweenJoint(objs[2], nil , CFrame.new(0.0553048849, -0.575121164, -1.07748175, 0.529399753, -0.312324286, 0.788789809, -0.848180771, -0.2146101, 0.48428458, 0.0180283934, -0.925416589, -0.378522098), function(X) return math.sin(math.rad(X)) end, 0.25) TweenJoint(objs[1], nil , CFrame.new(0, 0, 0.430387408, 1, 0, 0, 0, 1, 0, 0, 0, 1), function(X) return math.sin(math.rad(X)) end, 0.25) TweenJoint(objs[3], nil , CFrame.new(0.944218755, 0.740618229, -1.28885138, 0.173648149, 0.98480773, -1.17437144e-08, 0, 1.19248806e-08, 1, 0.98480773, -0.173648149, 2.07073336e-09), function(X) return math.sin(math.rad(X)) end, 0.25) wait(0.2) end; BoltForwardAnim = function(char, speed, objs) objs[5]:WaitForChild("BoltForward"):Play() TweenJoint(objs[1], nil , CFrame.new(), function(X) return math.sin(math.rad(X)) end, 0.1) TweenJoint(objs[2], nil , CFrame.new(0.0553048849, -0.874324203, -1.07748175, 0.529399753, -0.312324286, 0.788789809, -0.848180771, -0.2146101, 0.48428458, 0.0180283934, -0.925416589, -0.378522098), function(X) return math.sin(math.rad(X)) end, 0.1) TweenJoint(objs[3], nil , CFrame.new(0.944218755, 1.18022871, -1.28885138, 0.173648149, 0.98480773, -1.17437144e-08, 0, 1.19248806e-08, 1, 0.98480773, -0.173648149, 2.07073336e-09), function(X) return math.sin(math.rad(X)) end, 0.2) wait(0.2) end; -- Bolting Back BoltingBackAnim = function(char, speed, objs) TweenJoint(objs[1], nil , CFrame.new(0, 0, 0.273770154, 1, 0, 0, 0, 1, 0, 0, 0, 1), function(X) return math.sin(math.rad(X)) end, 0.001) end; BoltingForwardAnim = function(char, speed, objs) TweenJoint(objs[1], nil , CFrame.new(), function(X) return math.sin(math.rad(X)) end, 0.001) end; InspectAnim = function(char, speed, objs) ts:Create(objs[1],TweenInfo.new(1),{C1 = CFrame.new(0.805950999, 0.654529691, -1.92835355, 0.999723792, 0.0109803826, 0.0207702816, -0.0223077796, 0.721017241, 0.692557871, -0.00737112388, -0.692829967, 0.721063137)}):Play() ts:Create(objs[2],TweenInfo.new(1),{C1 = CFrame.new(-1.49363565, -0.699174881, -1.32277012, 0.66716975, -8.8829113e-09, -0.74490571, 0.651565909, -0.484672248, 0.5835706, -0.361035138, -0.874695837, -0.323358655)}):Play() wait(1) ts:Create(objs[2],TweenInfo.new(1),{C1 = CFrame.new(1.37424219, -0.699174881, -1.03685927, -0.204235911, 0.62879771, 0.750267386, 0.65156585, -0.484672219, 0.58357054, 0.730581641, 0.60803473, -0.310715646)}):Play() wait(1) ts:Create(objs[2],TweenInfo.new(1),{C1 = CFrame.new(-0.902175903, 0.295501232, -1.32277012, 0.935064793, -0.354476899, 4.22709467e-09, -0.110443868, -0.291336805, 0.950223684, -0.336832345, -0.888520718, -0.311568588)}):Play() ts:Create(objs[1],TweenInfo.new(1),{C1 = CFrame.new(0.447846293, 0.654529572, -1.81345785, 0.761665463, -0.514432132, 0.393986136, -0.560285628, -0.217437655, 0.799250066, -0.325492471, -0.82950604, -0.453843832)}):Play() wait(1) local MagC = Tool:WaitForChild("Mag"):clone() MagC:FindFirstChild("Mag"):Destroy() MagC.Parent = Tool MagC.Name = "MagC" local MagCW = Instance.new("Motor6D") MagCW.Part0 = MagC MagCW.Part1 = workspace.CurrentCamera:WaitForChild("Arms"):WaitForChild("Left Arm") MagCW.Parent = MagC MagCW.C1 = MagC.CFrame:toObjectSpace(Tool:WaitForChild('Mag').CFrame) Tool.Mag.Transparency = 1 Tool:WaitForChild('Grip'):WaitForChild("MagOut"):Play() ts:Create(objs[2],TweenInfo.new(0.15),{C1 = CFrame.new(-0.902175903, 0.295501232, -1.55972552, 0.935064793, -0.354476899, 4.22709467e-09, -0.110443868, -0.291336805, 0.950223684, -0.336832345, -0.888520718, -0.311568588)}):Play() ts:Create(objs[1],TweenInfo.new(0.3),{C1 = CFrame.new(0.447846293, 0.654529572, -2.9755671, 0.761665463, -0.514432132, 0.393986136, -0.568886042, -0.239798605, 0.786679745, -0.31021595, -0.823320091, -0.475299776)}):Play() wait(0.13) ts:Create(objs[2],TweenInfo.new(0.20),{C1 = CFrame.new(-0.902175903, 0.295501232, -1.28149843, 0.935064793, -0.354476899, 4.22709467e-09, -0.110443868, -0.291336805, 0.950223684, -0.336832345, -0.888520718, -0.311568588)}):Play() wait(0.20) ts:Create(objs[1],TweenInfo.new(0.5),{C1 = CFrame.new(0.447846293, -0.650498748, -1.82401526, 0.761665463, -0.514432132, 0.393986136, -0.646156013, -0.55753684, 0.521185875, -0.0484529883, -0.651545882, -0.75706023)}):Play() wait(0.8) ts:Create(objs[1],TweenInfo.new(0.6),{C1 = CFrame.new(0.447846293, 0.654529572, -2.9755671, 0.761665463, -0.514432132, 0.393986136, -0.568886042, -0.239798605, 0.786679745, -0.31021595, -0.823320091, -0.475299776)}):Play() wait(0.5) Tool:WaitForChild('Grip'):WaitForChild("MagIn"):Play() ts:Create(objs[1],TweenInfo.new(0.3),{C1 = CFrame.new(0.447846293, 0.654529572, -1.81345785, 0.761665463, -0.514432132, 0.393986136, -0.560285628, -0.217437655, 0.799250066, -0.325492471, -0.82950604, -0.453843832)}):Play() wait(0.3) MagC:Destroy() Tool.Mag.Transparency = 0 wait(0.1) end; nadeReload = function(char, speed, objs) script.Parent.Parent.Parent.Rocket.Transparency = 1 ts:Create(objs[1], TweenInfo.new(0.6), {C1 = CFrame.new(-0.902175903, -1.15645337, -1.32277012, 0.984807789, -0.163175702, -0.0593911409, 0, -0.342020363, 0.939692557, -0.17364797, -0.925416529, -0.336824328)}):Play() ts:Create(objs[2], TweenInfo.new(0.6), {C1 = CFrame.new(0.805950999, 0.654529691, -1.92835355, 0.787567914, -0.220087856, 0.575584888, -0.323594928, 0.647189975, 0.690240026, -0.524426222, -0.72986728, 0.438486755)}):Play() wait(0.6) ts:Create(objs[2], TweenInfo.new(0.6), {C1 = CFrame.new(0.805950999, 0.559619546, -1.73060048, 0.802135408, -0.348581612, 0.484839559, -0.597102284, -0.477574915, 0.644508123, 0.00688350201, -0.806481719, -0.59121877)}):Play() wait(0.2) Tool:WaitForChild('Grip'):WaitForChild("RocketInsert"):Play() wait(0.1) script.Parent.Parent.Parent.Rocket.Transparency = 0 Tool:WaitForChild('Grip'):WaitForChild("RocketClick"):Play() wait(0.6) end; AttachAnim = function(char, speed, objs) TweenJoint(objs[1], nil , CFrame.new(-2.05413628, -0.386312962, -0.955676377, 0.5, 0, -0.866025329, 0.852868497, -0.17364797, 0.492403895, -0.150383547, -0.984807789, -0.086823985), function(X) return math.sin(math.rad(X)) end, 0.25) TweenJoint(objs[2], nil , CFrame.new(0.931334019, 1.66565645, -1.2231313, 0.787567914, -0.220087856, 0.575584888, -0.0180282295, 0.925416708, 0.378521889, -0.615963817, -0.308488399, 0.724860728), function(X) return math.sin(math.rad(X)) end, 0.25) wait(0.18) end; -- Patrol Anim PatrolAnim = function(char, speed, objs) TweenJoint(objs[1], nil , sConfig.PatrolPosR, function(X) return math.sin(math.rad(X)) end, 0.25) TweenJoint(objs[2], nil , sConfig.PatrolPosL, function(X) return math.sin(math.rad(X)) end, 0.25) wait(0.18) end; } return Settings
-- Requires
local Database = require(ReplicateStorage.Common.Database)
--// 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 functionify 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 ent.MouseLeave:Connect(function(x,y) if inExpandable == ent then point.Visible = false end end) ent.MouseMoved:Connect(function(x,y) inExpandable = ent label.Text = text or ent.Desc.Value --point.Size = UDim2.new(0, 10000, 0, 10000) local newx = 500 local bounds = service.TextService:GetTextSize(text or ent.Desc.Value, label.TextSize, label.Font, Vector2.new(1000,1000)).X-- point.Label.TextBounds.X local rows = math.floor(bounds/500) rows = rows+1 if rows<1 then rows = 1 end if bounds<500 then newx = bounds end point.Size = UDim2.new(0, newx+10, 0, (rows*20)+10) point.Position = UDim2.new(0, x+6, 0, y-40-((rows*20)+10)) 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.TextXAlignment = data.TextXAlignment or original.TextXAlignment --data.TextYAlignment = data.TextYAlignment or original.TextYAlignment data.Font = data.Font or original.Font data.Parent = Drag return create("TextButton", data) 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 = dFont 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 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 (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" elseif (isEnabled ~= nil and isEnabled == false) or (isEnabled == nil and not enabled) then enabled = true new.Text = "Enabled" end if onToggle then onToggle(enabled, new) end debounce = false end end --new.ZIndex = data.ZIndex new.Text = (enabled and "Enabled") or "Disabled" new.MouseButton1Down:Connect(function() if onToggle then toggle() end end) new:SetSpecial("Toggle",function(ignore, isEnabled) toggle(isEnabled) end) 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 = ` {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 = data.Color or dBackground:lerp(Color3.new(1,1,1), 0.2); 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; BackgroundTransparency = 0.7; TextTransparency = data.TextTransparency; BackgroundColor3 = data.Color or dBackground:lerp(Color3.new(1,1,1), 0.2); BorderSizePixel = 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) 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 = ` {text}`; ToolTip = desc; Size = UDim2.new(1,-5,0,(entProps.ySize or 20)); Visible = true; BackgroundTransparency = 1; Font = "Arial"; 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 print(onClose) if onClose then onClose() end gTable:Destroy() end end function isVisible() return Main.Visible end local hideLabel = Hide:FindFirstChild("TextLabel") function doHide(doHide) local origLH = Hide.LineHeight if doHide or (doHide == nil and Main.Visible) then dragSize = Drag.Size Main.Visible = false Drag.BackgroundTransparency = Main.BackgroundTransparency Drag.BackgroundColor3 = Main.BackgroundColor3 Drag.Size = UDim2.new(0, 200, Drag.Size.Y.Scale, Drag.Size.Y.Offset) if hideLabel then hideLabel.Text = "+" else Hide.Text = "+" end Hide.LineHeight = origLH gTable.Minimized = true elseif doHide == false or (doHide == nil and not Main.Visible) then Main.Visible = true Drag.BackgroundTransparency = 1 Drag.Size = dragSize or Drag.Size if hideLabel then hideLabel.Text = "-" else Hide.Text = "-" end 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],Drag.Size.Y.Scale,Drag.Size.Y.Offset) 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
-- Number of bullets in a clip
local ClipSize = 40
--[[ The database may contain duplicated AssetId. It may also contain Accessories with the same name. Which can probably lead to issues when customizing your avatar. CATEGORY | LAST UPDATED | URL Hat December 29, 2019 https://search.roblox.com/catalog/json?Subcategory=9&IncludeNotForSale=true&ResultsPerPage=60&PageNumber= HairAccessory December 29, 2019 https://search.roblox.com/catalog/json?Subcategory=20&IncludeNotForSale=true&ResultsPerPage=60&PageNumber= FaceAccessory December 29, 2019 https://search.roblox.com/catalog/json?Subcategory=21&IncludeNotForSale=true&ResultsPerPage=60&PageNumber= NeckAccessory December 29, 2019 https://search.roblox.com/catalog/json?Subcategory=22&IncludeNotForSale=true&ResultsPerPage=60&PageNumber= ShoulderAccessory December 29, 2019 https://search.roblox.com/catalog/json?Subcategory=23&IncludeNotForSale=true&ResultsPerPage=60&PageNumber= FrontAccessory December 29, 2019 https://search.roblox.com/catalog/json?Subcategory=24&IncludeNotForSale=true&ResultsPerPage=60&PageNumber= BackAccessory December 29, 2019 https://search.roblox.com/catalog/json?Subcategory=25&IncludeNotForSale=true&ResultsPerPage=60&PageNumber= WaistAccessory December 29, 2019 https://search.roblox.com/catalog/json?Subcategory=26&IncludeNotForSale=true&ResultsPerPage=60&PageNumber= Face December 29, 2019 https://search.roblox.com/catalog/json?Subcategory=10&IncludeNotForSale=true&ResultsPerPage=60&PageNumber= Heads December 29, 2019 https://search.roblox.com/catalog/json?Subcategory=15&IncludeNotForSale=true&ResultsPerPage=60&PageNumber= Animations December 29, 2019 Manually go through all animation bundles cause there are only 17 of them Bundles December 29, 2019 You can get all the bundles by AssetService:GetBundleDetailsAsync() from 1 - 700+ Clothes December 29, 2019 I only provided Roblox created Shirts and Pants that are still onsale. You can use your own clothing database --]]
--//Controller//--
while task.wait(Configuration.Time.Value) do if Humanoid then Humanoid:TakeDamage(Configuration.Damage.Value) end end
--[[ Controller that sets different user interface views for the client. Listens to player state updates, creating and destructing views as necessary. ]]
local ReplicatedStorage = game:GetService("ReplicatedStorage") local StarterGui = game:GetService("StarterGui") local UserInputService = game:GetService("UserInputService") local Logger = require(ReplicatedStorage.Dependencies.GameUtils.Logger) local userInterfaceFolder = ReplicatedStorage.Source.UserInterface local views = { pregame = require(userInterfaceFolder.PreGame), pregameready = require(userInterfaceFolder.PreGameReady), game = require(userInterfaceFolder.Game), camera = require(userInterfaceFolder.Camera), postgame = require(userInterfaceFolder.PostGame) } local currentView local UIController = {}
--used by checkTeams
function sameTeam(otherHuman) local player = Tag.Value local otherPlayer = game:GetService("Players"):GetPlayerFromCharacter(otherHuman.Parent) if player and otherPlayer then if player == otherPlayer then return true end if otherPlayer.Neutral then return false end return player.TeamColor == otherPlayer.TeamColor end return false end function tagHuman(human) local tag = Tag:Clone() tag.Parent = human game:GetService("Debris"):AddItem(tag) end
--edit the below function to execute code when this response is chosen OR this prompt is shown --player is the player speaking to the dialogue, and dialogueFolder is the object containing the dialogue data
return function(player, dialogueFolder) local Money = require(game.ReplicatedStorage.Source.SystemModules.Money) Money.SellPiece(player) end
--[=[ @return string Metamethod to transform the option into a string. ```lua local optA = Option.Some(64) local optB = Option.None print(optA) --> Option<number> print(optB) --> Option<None> ``` ]=]
function Option:__tostring() if self:IsSome() then return ("Option<" .. typeof(self._v) .. ">") else return "Option<None>" end end
--Made by Luckymaxer
Model = script.Parent Debris = game:GetService("Debris") FadeRate = 0.025 Rate = (1 / 15) Removing = false function RemoveModel() if Removing then return end local Parts = {} for i, v in pairs(Model:GetChildren()) do if v:IsA("BasePart") then table.insert(Parts, v) end end if #Parts == 0 then Removing = true Model.Name = "" Debris:AddItem(Model, 0.5) end end Model.ChildRemoved:connect(function(Child) RemoveModel() end) wait(1) RemoveModel()
-- listen for jumping and landing and apply sway and camera mvoement to the viewmodel
humanoid.StateChanged:Connect(function(oldstate, newstate) if isfirstperson == true and includejumpsway == true then -- dont apply camera/viewmodel changes if we aren't in first person if newstate == Enum.HumanoidStateType.Landed then -- animate the camera's landing "thump" -- -- tween a dummy cframe value for camera recoil local camedit = Instance.new("CFrameValue") camedit.Value = CFrame.new(0,0,0)*CFrame.Angles(math.rad(-0.75)*swaysize,0,0) local landedrecoil = tweenservice:Create(camedit, TweenInfo.new((0.03*6)/sensitivity, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {Value = CFrame.new(0,0,0)}) ; landedrecoil:Play() ; game:GetService("Debris"):AddItem(landedrecoil, 2) landedrecoil.Completed:Connect(function() camedit.Value = CFrame.new(0,0,0)*CFrame.Angles(math.rad(0.225)*swaysize,0,0) local landedrecovery = tweenservice:Create(camedit, TweenInfo.new((0.03*24)/sensitivity, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), {Value = CFrame.new(0,0,0)}) ; landedrecovery:Play(); game:GetService("Debris"):AddItem(landedrecovery, 3) end) -- apply the camera adjustments task.spawn(function() for i = 1,60 do camera.CFrame = camera.CFrame*camedit.Value runservice.Heartbeat:Wait() end end) -- animate the jump sway to make the viewmodel thump down on landing local viewmodelrecoil = tweenservice:Create(jumpswaygoal, TweenInfo.new(0.15/sensitivity, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), {Value = CFrame.new(0,0,0)*CFrame.Angles(-math.rad(5)*swaysize,0,0)}) ; viewmodelrecoil:Play(); game:GetService("Debris"):AddItem(viewmodelrecoil, 2) viewmodelrecoil.Completed:Connect(function() local viewmodelrecovery = tweenservice:Create(jumpswaygoal, TweenInfo.new(0.7/sensitivity, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {Value = CFrame.new(0,0,0)}) ; viewmodelrecovery:Play() ; game:GetService("Debris"):AddItem(viewmodelrecovery, 2) end) elseif newstate == Enum.HumanoidStateType.Freefall then -- animate jump sway when the character is falling or jumping local viewmodeljump = tweenservice:Create(jumpswaygoal, TweenInfo.new(0.5/sensitivity, Enum.EasingStyle.Sine), {Value = CFrame.new(0,0,0)*CFrame.Angles(math.rad(7.5)*swaysize,0,0)}) ; viewmodeljump:Play() ; game:GetService("Debris"):AddItem(viewmodeljump, 2) end end end)
--// All global vars will be wiped/replaced except script --// All guis are autonamed codeName..gui.Name
return function(data) local player = service.Players.LocalPlayer local playergui = player.PlayerGui local gui = script.Parent.Parent local frame = gui.Frame local text = gui.Frame.TextBox local scroll = gui.Frame.ScrollingFrame local players = gui.Frame.PlayerList local entry = gui.Entry local BindEvent = gTable.BindEvent local opened = false local scrolling = false local debounce = false local settings = client.Remote.Get("Setting",{"SplitKey","ConsoleKeyCode","BatchKey"}) local splitKey = settings.SplitKey local consoleKey = settings.ConsoleKeyCode local batchKey = settings.BatchKey local commands = client.Remote.Get('FormattedCommands') or {} frame.Position = UDim2.new(0,0,0,-200) frame.Visible = false frame.Size = UDim2.new(1,0,0,40) scroll.Visible = false if client.Variables.ConsoleOpen then if client.Variables.ChatEnabled then service.StarterGui:SetCoreGuiEnabled("Chat",true) end if client.Variables.PlayerListEnabled then service.StarterGui:SetCoreGuiEnabled('PlayerList',true) end if client.UI.Get("Notif") then client.UI.Get("Notif",nil,true).Object.LABEL.Visible = true end local scr = client.UI.Get("Chat",nil,true) if scr then scr.Object.Drag.Visible = true end local scr = client.UI.Get("PlayerList",nil,true) if scr then scr.Object.Drag.Visible = true end local scr = client.UI.Get("HintHolder",nil,true) if scr then scr.Object.Frame.Visible = true end end client.Variables.ChatEnabled = service.StarterGui:GetCoreGuiEnabled("Chat") client.Variables.PlayerListEnabled = service.StarterGui:GetCoreGuiEnabled('PlayerList') local function close() if gui:IsDescendantOf(game) and not debounce then debounce = true scroll:ClearAllChildren() scroll.CanvasSize = UDim2.new(0,0,0,0) scroll.ScrollingEnabled = false frame.Size = UDim2.new(1,0,0,40) scroll.Visible = false players.Visible = false scrollOpen = false if client.Variables.ChatEnabled then service.StarterGui:SetCoreGuiEnabled("Chat",true) end if client.Variables.PlayerListEnabled then service.StarterGui:SetCoreGuiEnabled('PlayerList',true) end if client.UI.Get("Notif") then client.UI.Get("Notif",nil,true).Object.LABEL.Visible = true end local scr = client.UI.Get("Chat",nil,true) if scr then scr.Object.Drag.Visible = true end local scr = client.UI.Get("PlayerList",nil,true) if scr then scr.Object.Drag.Visible = true end local scr = client.UI.Get("HintHolder",nil,true) if scr then scr.Object.Frame.Visible = true end service.SafeTweenPos(frame,UDim2.new(0,0,0,-200),'Out','Linear',0.2,true) --frame:TweenPosition(UDim2.new(0,0,0,-200),'Out','Linear',0.2,true) debounce = false opened = false end end local function open() if gui:IsDescendantOf(game) and not debounce then debounce = true client.Variables.ChatEnabled = service.StarterGui:GetCoreGuiEnabled("Chat") client.Variables.PlayerListEnabled = service.StarterGui:GetCoreGuiEnabled('PlayerList') service.StarterGui:SetCoreGuiEnabled("Chat",false) service.StarterGui:SetCoreGuiEnabled('PlayerList',false) scroll.ScrollingEnabled = true players.ScrollingEnabled = true if client.UI.Get("Notif") then client.UI.Get("Notif",nil,true).Object.LABEL.Visible = false end local scr = client.UI.Get("Chat",nil,true) if scr then scr.Object.Drag.Visible = false end local scr = client.UI.Get("PlayerList",nil,true) if scr then scr.Object.Drag.Visible = false end local scr = client.UI.Get("HintHolder",nil,true) if scr then scr.Object.Frame.Visible = false end frame.Size = UDim2.new(1,0,0,40) scroll.Visible = false players.Visible = false scrollOpen = false text.Text = '' frame.Visible = true frame.Position = UDim2.new(0,0,0,0) text:CaptureFocus() text.Text = '' wait() text.Text = '' debounce = false opened = true end end text.FocusLost:connect(function(enterPressed) if enterPressed then if text.Text~='' and string.len(text.Text)>1 then client.Remote.Send('ProcessCommand',text.Text) end close() end end) text.Changed:connect(function(c) if c == 'Text' and text.Text ~= '' and open then scroll:ClearAllChildren() players:ClearAllChildren() local nText = text.Text if string.match(nText,".*"..batchKey.."([^']+)") then nText = string.match(nText,".*"..batchKey.."([^']+)") nText = string.match(nText,"^%s*(.-)%s*$") end local pNum = 0 local pMatch = string.match(nText,".+"..splitKey.."(.*)$") for i,v in next,service.Players:GetChildren() do if (pMatch and string.sub(string.lower(tostring(v)),1,#pMatch) == string.lower(pMatch)) or string.match(nText,splitKey.."$") then local new = entry:Clone() new.Text = tostring(v) new.TextXAlignment = "Right" new.Visible = true new.Parent = players new.Position = UDim2.new(0,0,0,20*pNum) new.MouseButton1Down:connect(function() text.Text = text.Text..tostring(v) text:CaptureFocus() end) pNum = pNum+1 end end players.CanvasSize = UDim2.new(0,0,0,pNum*20) local num = 0 for i,v in next,commands do if string.sub(string.lower(v),1,#nText) == string.lower(nText) or string.find(string.lower(v),string.match(string.lower(nText),"^(.-)"..splitKey) or string.lower(nText)) then if not scrollOpen then frame.Size = UDim2.new(1,0,0,330) scroll.Visible = true players.Visible = true scrollOpen = true end local b = entry:clone() b.Visible = true b.Parent = scroll b.Text = v b.Position = UDim2.new(0,0,0,20*num) b.MouseButton1Down:connect(function() text.Text = b.Text text:CaptureFocus() end) num = num+1 end end scroll.CanvasSize = UDim2.new(0,0,0,num*20) elseif c == 'Text' and text.Text == '' and opened then service.SafeTweenSize(frame,UDim2.new(1,0,0,40),nil,nil,0.3,nil,function() if scrollOpen then frame.Size = UDim2.new(1,0,0,140) end end) scroll.Visible = false players.Visible = false scrollOpen = false scroll:ClearAllChildren() scroll.CanvasSize = UDim2.new(0,0,0,0) end end) BindEvent(service.UserInputService.InputBegan, function(InputObject) local textbox = service.UserInputService:GetFocusedTextBox() if not (textbox) and rawequal(InputObject.UserInputType, Enum.UserInputType.Keyboard) and InputObject.KeyCode.Name == (client.Variables.CustomConsoleKey or consoleKey) then if opened then close() else open() end client.Variables.ConsoleOpen = opened end end) gTable:Ready() end