prompt
stringlengths
2
14.7k
completion
stringlengths
1
99.7k
-- this script doesn't actually give out anything.
local B1 = script.Parent.Button1.ClickDetector local B2 = script.Parent.Button2.ClickDetector local B3 = script.Parent.Button3.ClickDetector local deb = false local TS = game:GetService("TweenService") function Press(button) if not deb then deb = true local start = TS:Create(button,TweenInfo.new(.1,Enum.EasingStyle.Sine,Enum.EasingDirection.In,0,false),{CFrame = button.CFrame*CFrame.new(0,0,0.045)}) start.Completed:Connect(function() local End = TS:Create(button,TweenInfo.new(.1,Enum.EasingStyle.Sine,Enum.EasingDirection.In,0,false),{CFrame = button.CFrame*CFrame.new(0,0,-0.045)}) End.Completed:Connect(function() deb = false end) End:Play() end) start:Play() end end B1.MouseClick:Connect(function() Press(B1.Parent) end) B2.MouseClick:Connect(function() Press(B2.Parent) end) B3.MouseClick:Connect(function() Press(B3.Parent) end)
-- Make the object appear when the ProximityPrompt is used
local function effect() if object then Prox.Enabled = true object.Humanoid.Health = -1 end end Prox.Triggered:Connect(effect)
--[[ A middleware that allows for functions to be dispatched. Functions will receive a single argument, the store itself. This middleware consumes the function; middleware further down the chain will not receive it. ]]
local function thunkMiddleware(nextDispatch, store) return function(action) if typeof(action) == "function" then return action(store) else return nextDispatch(action) end end end return thunkMiddleware
--Uberubert --This script is free to use for anyone
local ting = 0 --debouncer function onTouched(hit) if ting == 0 then --debounce check ting = 1 --activate debounce check = hit.Parent:FindFirstChild("Humanoid") --Find the human that touched the button if check ~= nil then --If a human is found, then local user = game.Players:GetPlayerFromCharacter(hit.Parent) --get player from touching human local stats = user:findFirstChild("leaderstats") --Find moneyholder if stats ~= nil then --If moneyholder exists then local cash = stats:findFirstChild("SOULS") --Money type cash.Value = cash.Value +5000 --increase amount of money by the number displayed here (500) wait(3) --wait-time before button works again end end ting = 0 --remove debounce end end script.Parent.Touched:connect(onTouched)
--Start the constant movement calculator
delay(0, function() while true do bv.velocity = seat.CFrame.lookVector * speed bav.angularvelocity = Vector3.new(0, rotSpeed, 0) wait() end end) seat.Changed:connect(function(prop) if prop == "Throttle" then if seat.Throttle == 1 or seat.Throttle == -1 then speed = maxSpeed * seat.Throttle elseif seat.Throttle == 0 then speed = 0 end elseif prop == "Steer" then if seat.Steer == -1 or seat.Steer == 1 then rotSpeed = maxRotSpeed * -seat.Steer elseif seat.Steer == 0 then rotSpeed = 0 end end end)
--[[ SCRIPT VARIABLES ]]
local CHAT_BUBBLE_FONT = Enum.Font.SourceSansItalic local CHAT_BUBBLE_FONT_SIZE = Enum.FontSize.Size24 -- if you change CHAT_BUBBLE_FONT_SIZE_INT please change this to match local CHAT_BUBBLE_FONT_SIZE_INT = 24 -- if you change CHAT_BUBBLE_FONT_SIZE please change this to match local CHAT_BUBBLE_LINE_HEIGHT = CHAT_BUBBLE_FONT_SIZE_INT + 10 local CHAT_BUBBLE_TAIL_HEIGHT = 14 local CHAT_BUBBLE_WIDTH_PADDING = 30 local CHAT_BUBBLE_FADE_SPEED = 1.5 local BILLBOARD_MAX_WIDTH = 400 local BILLBOARD_MAX_HEIGHT = 250 --This limits the number of bubble chats that you see above characters local ELIPSES = "..." local MaxChatMessageLength = 128 -- max chat message length, including null terminator and elipses. local MaxChatMessageLengthExclusive = MaxChatMessageLength - string.len(ELIPSES) - 1 local NEAR_BUBBLE_DISTANCE = 65 --previously 45 local MAX_BUBBLE_DISTANCE = 100 --previously 80
--[[ Local Functions ]]
-- local function createArrowLabel(name, position, size, rectOffset, rectSize) local image = Instance.new('ImageLabel') image.Name = name image.Image = DPAD_SHEET image.ImageRectOffset = rectOffset image.ImageRectSize = rectSize image.BackgroundTransparency = 1 image.Size = size image.Position = position image.Parent = DPadFrame return image end local function getCenterPosition() return Vector2.new(DPadFrame.AbsolutePosition.x + DPadFrame.AbsoluteSize.x/2, DPadFrame.AbsolutePosition.y + DPadFrame.AbsoluteSize.y/2) end
-- Module Scripts
local moduleScripts = ServerStorage.ModuleScripts local gameSettings = require(moduleScripts.GameSettings) local leaderboardManager = require(moduleScripts.LeaderboardManager) local actionManager = require(moduleScripts.ActionManager) local mapManager = require(moduleScripts.MapManager)
-------------------------
function onClicked() script.Parent.Parent.Parent.StopSign1.SurfaceGui.TextLabel.Text = "STOPPING" script.Parent.Parent.Parent.StopSign1.Ding:play() script.Parent.Parent.Parent.StopSign2.SurfaceGui.TextLabel.Text = "STOPPING" script.Parent.Parent.Parent.StopSign2.Ding:play() script.Parent.Parent.Parent.StopSign3.SurfaceGui.TextLabel.Text = "STOPPING" script.Parent.Parent.Parent.StopSign3.Ding:play() end script.Parent.ClickDetector.MouseClick:connect(onClicked)
-- @Description Resize a specific %Model to a larger %Scale multiplier -- @Arg1 Model -- @Arg2 Scale
function Basic.ScaleModelWithJoints(model, scale) local origin = model.PrimaryPart.Position for _, obj in ipairs(model:GetDescendants()) do if obj:IsA("BasePart") then obj.Size = obj.Size*scale local distance = (obj.Position - model:GetPrimaryPartCFrame().p) local rotation = (obj.CFrame - obj.Position) obj.CFrame = (CFrame.new(model:GetPrimaryPartCFrame().p + distance*scale) * rotation) elseif obj:IsA("SpecialMesh") and obj.MeshType == Enum.MeshType.FileMesh then obj.Scale = obj.Scale*scale elseif obj:IsA("JointInstance") then local c0NewPos = obj.C0.p*scale local c0RotX, c0RotY, c0RotZ = obj.C0:ToEulerAnglesXYZ() local c1NewPos = obj.C1.p*scale local c1RotX, c1RotY, c1RotZ = obj.C1:ToEulerAnglesXYZ() obj.C0 = CFrame.new(c0NewPos)*CFrame.Angles(c0RotX, c0RotY, c0RotZ) obj.C1 = CFrame.new(c1NewPos)*CFrame.Angles(c1RotX, c1RotY, c1RotZ) end end return model end function Basic.Destroy(obj) if not obj then return end obj:Destroy() end return Basic
--[=[ Warps the WaitForChild API with a promise @class promiseChild ]=]
local require = require(script.Parent.loader).load(script) local Promise = require("Promise")
--[[ Loads all ModuleScripts within the given parent. Loader.LoadChildren(parent: Instance): module[] Loader.LoadDescendants(parent: Instance): module[] --]]
local Loader = {} type Module = {} type Modules = {Module} function Loader.LoadChildren(parent: Instance): Modules local modules: Modules = {} for _,child in ipairs(parent:GetChildren()) do if (child:IsA("ModuleScript")) then local m = require(child) table.insert(modules, m) end end return modules end function Loader.LoadDescendants(parent: Instance): Modules local modules: Modules = {} for _,descendant in ipairs(parent:GetDescendants()) do if (descendant:IsA("ModuleScript")) then local m = require(descendant) table.insert(modules, m) end end return modules end return Loader
-- Function called when a player joins the game
local function onPlayerAdded(player) player.CharacterAdded:Connect(onCharacterAdded) end
--sensor.Disabled = false --SENSOR
Car.BodyVelocity.velocity = Vector3.new(0, -40, 0) wait(0.3) Car.BodyVelocity.velocity = Vector3.new(0, -30, 0) wait(0.2) Car.BodyVelocity.velocity = Vector3.new(0, -30, 0) wait(0.2) Car.BodyVelocity.velocity = Vector3.new(0, -10, 0) wait(0.1) Car.BodyVelocity.velocity = Vector3.new(0, -5, 0) wait(2.3) Car.BodyVelocity.velocity = Vector3.new(0, 0, 0) --Hacia Arriba 3 wait(0.1) Car.BodyVelocity.velocity = Vector3.new(0, 25, 0) wait(0.4) Car.BodyVelocity.velocity = Vector3.new(0, 35, 0) wait(0.3) Car.BodyVelocity.velocity = Vector3.new(0, 38, 0) wait(0.3) Car.BodyVelocity.velocity = Vector3.new(0, 35, 0) wait(1) Car.BodyVelocity.velocity = Vector3.new(0, 30, 0) wait(0.3) Car.BodyVelocity.velocity = Vector3.new(0, 25, 0) wait(0.3) Car.BodyVelocity.velocity = Vector3.new(0, 15, 0) wait(0.4) Car.BodyVelocity.velocity = Vector3.new(0, 0, 0) wait(0.1) Car.BodyVelocity.velocity = Vector3.new(0, -10, 0) --Hacia Abajo 4 wait(0.5) Car.BodyVelocity.velocity = Vector3.new(0, -20, 0) wait(0.5) Car.BodyVelocity.velocity = Vector3.new(0, -30, 0) wait(0.5) Car.BodyVelocity.velocity = Vector3.new(0, -35, 0) wait(0.5) Car.BodyVelocity.velocity = Vector3.new(0, -38, 0) wait(0.5) Car.BodyVelocity.velocity = Vector3.new(0, -30, 0) wait(0.5) Car.BodyVelocity.velocity = Vector3.new(0, -20, 0) wait(0.5) Car.BodyVelocity.velocity = Vector3.new(0, -8, 0) wait(0.5) Car.BodyVelocity.velocity = Vector3.new(0, 0, 0) --Hacia Arriba 3 wait(0.1) Car.BodyVelocity.velocity = Vector3.new(0, 5, 0) wait(0.4) Car.BodyVelocity.velocity = Vector3.new(0, 8, 0) wait(0.3) Car.BodyVelocity.velocity = Vector3.new(0, 10, 0) wait(0.3) Car.BodyVelocity.velocity = Vector3.new(0, 12, 0) wait(1) Car.BodyVelocity.velocity = Vector3.new(0, 15, 0) wait(0.3) Car.BodyVelocity.velocity = Vector3.new(0, 10, 0) wait(0.3) Car.BodyVelocity.velocity = Vector3.new(0, 5, 0) wait(0.2) Car.BodyVelocity.velocity = Vector3.new(0, 0, 0) wait(0.1) --Hacia Arriba 3 y Abajo Fin Car.BodyVelocity.velocity = Vector3.new(0, -10, 0) --Hacia Abajo 4 wait(0.5) Car.BodyVelocity.velocity = Vector3.new(0, -40, 0) wait(0.5) Car.BodyVelocity.velocity = Vector3.new(0, -60, 0) wait(0.5) Car.BodyVelocity.velocity = Vector3.new(0, -80, 0) wait(0.5) Car.BodyVelocity.velocity = Vector3.new(0, -60, 0) wait(0.5) Car.BodyVelocity.velocity = Vector3.new(0, -40, 0) wait(0.5) Car.BodyVelocity.velocity = Vector3.new(0, -20, 0) wait(0.5) Car.BodyVelocity.velocity = Vector3.new(0, -8, 0) Car.Sound.Playing = false wait(1) Car.BodyVelocity.velocity = Vector3.new(0, 0, 0) script.Parent.ClickDetector.MaxActivationDistance = "32" wait(5) end script.Parent.ClickDetector.MouseClick:connect(onClicked)
-- adds a BezierPoint to the Bezier -- a BezierPoint can either be a Vector3 or a BasePart -- a Vector3 BezierPoint is static, while a BasePart BezierPoint changes if the BasePart's position changes
function Bezier:AddBezierPoint(p: Vector3 | BasePart, index: number?) -- check if given value is a Vector3 or BasePart if p and (typeof(p) == "Instance" and p:IsA("BasePart")) or typeof(p) == "Vector3" then local newPoint: BezierPoint = { Type = typeof(p) == "Vector3" and "StaicPoint" or "BasePartPoint"; Point = p; } -- if point is a BasePartPoint, then watch for removal and changes if newPoint.Type == "BasePartPoint" then local connection, connection2 -- changed connection connection = (p:: BasePart).Changed:Connect(function(prop) if prop == "Position" then self:UpdateLength() end end) -- deleted connection connection2 = (p:: BasePart).AncestryChanged:Connect(function(_, parent) if parent == nil then local index = table.find(self.Points, newPoint) if index then table.remove(self.Points, index) end connection:Disconnect() connection:Disconnect() end end) -- check if there is a connection table for the basepart if not self._connections[p] then self._connections[p] = {} end -- add connections to connection table table.insert(self._connections[p], connection) table.insert(self._connections[p], connection2) end -- add to list of points if index and type(index) == "number" then -- found index, add at index table.insert(self.Points, index, newPoint) elseif not index then -- did not find index, add to end of table table.insert(self.Points, newPoint) elseif type(index) ~= "number" then -- incorrect type error("Bezier:AddBezierPoint() only accepts an integer as the second argument!") end -- update bezier self:UpdateLength() else error("Bezier:AddBezierPoint() only accepts a Vector3 or BasePart as the first argument!") end end
--------RIGHT DOOR --------
game.Workspace.doorright.l11.BrickColor = BrickColor.new(21) game.Workspace.doorright.l12.BrickColor = BrickColor.new(21) game.Workspace.doorright.l13.BrickColor = BrickColor.new(21) game.Workspace.doorright.l41.BrickColor = BrickColor.new(21) game.Workspace.doorright.l42.BrickColor = BrickColor.new(21) game.Workspace.doorright.l43.BrickColor = BrickColor.new(21) game.Workspace.doorright.l71.BrickColor = BrickColor.new(21) game.Workspace.doorright.l72.BrickColor = BrickColor.new(21) game.Workspace.doorright.l73.BrickColor = BrickColor.new(21) game.Workspace.doorright.l21.BrickColor = BrickColor.new(133) game.Workspace.doorright.l22.BrickColor = BrickColor.new(133) game.Workspace.doorright.l23.BrickColor = BrickColor.new(133) game.Workspace.doorright.l51.BrickColor = BrickColor.new(133) game.Workspace.doorright.l52.BrickColor = BrickColor.new(133) game.Workspace.doorright.l53.BrickColor = BrickColor.new(133) game.Workspace.doorright.l31.BrickColor = BrickColor.new(106) game.Workspace.doorright.l32.BrickColor = BrickColor.new(106) game.Workspace.doorright.l33.BrickColor = BrickColor.new(106) game.Workspace.doorright.l61.BrickColor = BrickColor.new(106) game.Workspace.doorright.l62.BrickColor = BrickColor.new(106) game.Workspace.doorright.l63.BrickColor = BrickColor.new(106) game.Workspace.doorright.pillar.BrickColor = BrickColor.new(106)
--MOT is up and down while MOT2 is side to side
wt = 0.07 while wait(0.01) do if values.Gear.Value == -1 then MOT2.DesiredAngle = -0.4 wait(wt) MOT.DesiredAngle = -0.2 end if values.Gear.Value == 0 then MOT.DesiredAngle = 0 wait(wt) MOT2.DesiredAngle = 0 end if values.Gear.Value == 1 then MOT2.DesiredAngle = 0.2 wait(wt) MOT.DesiredAngle = -0.2 end if values.Gear.Value == 2 then MOT.DesiredAngle = 0.2 wait(wt) MOT2.DesiredAngle = 0.2 end if values.Gear.Value == 3 then MOT.DesiredAngle = -0.2 wait(wt) MOT2.DesiredAngle = 0 end if values.Gear.Value == 4 then MOT.DesiredAngle = 0.2 wait(wt) MOT2.DesiredAngle = 0 end if values.Gear.Value == 5 then MOT.DesiredAngle = -0.2 wait(wt) MOT2.DesiredAngle = -0.2 end if values.Gear.Value == 6 then MOT.DesiredAngle = 0.2 wait(wt) MOT2.DesiredAngle = -0.2 end end
-- Style Options
Flat=true; -- Enables Flat theme / Disables Aero theme ForcedColor=true; -- Forces everyone to have set color & transparency Color=Color3.new(34,21,10); -- Changes the Color of the user interface ColorTransparency=.75; -- Changes the Transparency of the user interface Chat=true; -- Enables the custom chat BubbleChat=false; -- Enables the custom bubble chat
--[=[ Wraps TeleportService:PromiseTeleport(placeId, players, teleportOptions) @param placeId number @param players { Player } @param teleportOptions TeleportOptions @return Promise<string> -- Code ]=]
function TeleportServiceUtils.promiseTeleport(placeId, players, teleportOptions) assert(type(placeId) == "number", "Bad placeId") assert(type(players) == "table", "Bad players") assert(typeof(teleportOptions) == "Instance" and teleportOptions:IsA("TeleportOptions") or teleportOptions == nil, "Bad options") return Promise.spawn(function(resolve, reject) local teleportAsyncResult local ok, err = pcall(function() teleportAsyncResult = TeleportService:TeleportAsync(placeId, players, teleportOptions) end) if not ok then return reject(err) end return resolve(teleportAsyncResult) end) end return TeleportServiceUtils
-----<< CONNECTIONS >>-----
reloadEvent.OnServerEvent:Connect(reload) fireEvent.OnServerEvent:Connect(function(player, target) if tool.Parent == player.Character then -- If tool has enough shots then fires. Otherwise reloads. if currentAmmo <= 0 then return reload(player) end if canFire then canFire = false currentAmmo = currentAmmo - 1 shotEvent:FireClient(player, currentAmmo, ammoLeft) fireSound:Play() muzzle.EffectAttachment.MuzzleFlash:Emit(1) spawn(function() createBullet(target) end) wait() tool.GripUp = Vector3.new(0, 0.2, 1) wait() tool.GripUp = Vector3.new(0, 0, 1) delay(attackCooldown, function() canFire = true end) end end end) player.Character.Humanoid.Touched:Connect(function(obj) if obj.Name == "AmmoCrate" and equipped and ammoLeft < extraAmmo then tool.Handle.ReplenishSound:Play() ammoLeft = extraAmmo shotEvent:FireClient(player, currentAmmo, ammoLeft) end end)
--[[Transmission]]
Tune.TransModes = {"Auto"} --[[ [Modes] "Auto" : Automatic shifting "Semi" : Clutchless manual shifting, dual clutch transmission "Manual" : Manual shifting with clutch >Include within brackets eg: {"Semi"} or {"Auto", "Manual"} >First mode is default mode ]] --Automatic Settings Tune.AutoShiftMode = "RPM" --[[ [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 = 400 --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.80 , -- Copy and paste a ratio to add a gear --[[Neutral]] 0 , -- Ratios can also be deleted --[[ 1 ]] 3 , -- Reverse, Neutral, and 1st gear are required --[[ 2 ]] 1.36 , --[[ 3 ]] 1 , --[[ 4 ]] 0.73 , } Tune.FDMult = 1.5 -- Ratio multiplier (Change this value instead of FinalDrive if car is struggling with torque ; Default = 1)
-- local creator_tag = Instance.new("ObjectValue") -- Don't need this anymore, as the module only needs the player value -- creator_tag.Value = plr -- creator_tag.Name = "creator" -- creator_tag.Parent = bomb2
bomb2.CFrame=cf bomb2.Parent=workspace game.ServerScriptService.b:Fire(plr,"Bomb",bomb2.Position,bomb2) wait(6) Tool.Enabled=true end Tool.Fire.OnServerEvent:Connect(FireWep)
--[[ The sound dispatcher will fire sound events to properly loaded characters. This script manages a list of characters currently loaded in the game. When a character fires a sound event, this dispatcher will check to make sure the event only fires on characters who have loaded in. --]]
local ReplicatedStorage = game:GetService("ReplicatedStorage") local SOUND_EVENT_FOLDER_NAME = "DefaultSoundEvents" if UserSettings():IsUserFeatureEnabled("UserUseSoundDispatcher") then local loadedCharacters = {} local EventFolder = ReplicatedStorage:FindFirstChild(SOUND_EVENT_FOLDER_NAME) if not EventFolder then EventFolder = Instance.new("Folder") EventFolder.Name = SOUND_EVENT_FOLDER_NAME EventFolder.Archivable = false EventFolder.Parent = ReplicatedStorage end local function createEvent(name, instanceType) local newEvent = EventFolder:FindFirstChild(name) if not newEvent then newEvent = Instance.new(instanceType) newEvent.Name = name newEvent.Parent = EventFolder end return newEvent end local DefaultServerSoundEvent = createEvent("DefaultServerSoundEvent", "RemoteEvent") local AddCharacterLoadedEvent = createEvent("AddCharacterLoadedEvent", "RemoteEvent") local RemoveCharacterEvent = createEvent("RemoveCharacterEvent", "RemoteEvent") -- Fire the sound event to all clients connected local function fireDefaultServerSoundEventToClient(player, sound, playing, resetPosition) if loadedCharacters[player] then DefaultServerSoundEvent:FireClient(player, sound, playing, resetPosition) end end -- Add a character to the list of clients ready to receive sounds local function addCharacterLoaded(player) loadedCharacters[player] = true end -- Remove a character from the table local function removeCharacter(player) loadedCharacters[player] = nil end local soundDispatcher = createEvent("SoundDispatcher", "BindableEvent") soundDispatcher.Event:Connect(fireDefaultServerSoundEventToClient) --no op function to prevent rogue client from filling RemoteEvent queue DefaultServerSoundEvent.OnServerEvent:Connect(function() end) AddCharacterLoadedEvent.OnServerEvent:Connect(addCharacterLoaded) RemoveCharacterEvent.OnServerEvent:Connect(removeCharacter) end
--!nonstrict --[[ DEVELOPMENT HAS BEEN MOVED FROM DAVEY_BONES/SCELERATIS TO THE EPIX INCORPORATED GROUP CURRENT LOADER: https://www.roblox.com/library/7510622625/Adonis-Admin-Loader-Epix-Incorporated CURRENT MODULE: https://www.roblox.com/library/7510592873/Adonis-MainModule NIGHTLY MODULE: https://www.roblox.com/library/8612978896/Nightlies-Adonis-MainModule --]]
--function CreateGUI()
--local p = game.Players:GetPlayerFromCharacter(humanoid.Parent) --print("Health for Player: " .. p.Name) --script.HealthGUI.Parent = p.PlayerGui
-- Was called OnMoveTouchEnded in previous version
function DynamicThumbstick:OnInputEnded() self.moveTouchObject = nil self.moveVector = ZERO_VECTOR3 self:FadeThumbstick(false) end function DynamicThumbstick:FadeThumbstick(visible) if not visible and self.moveTouchObject then return end if self.isFirstTouch then return end if self.startImageFadeTween then self.startImageFadeTween:Cancel() end if self.endImageFadeTween then self.endImageFadeTween:Cancel() end for i = 1, #self.middleImages do if self.middleImageFadeTweens[i] then self.middleImageFadeTweens[i]:Cancel() end end if visible then self.startImageFadeTween = TweenService:Create(self.startImage, ThumbstickFadeTweenInfo, { ImageTransparency = 0 }) self.startImageFadeTween:Play() self.endImageFadeTween = TweenService:Create(self.endImage, ThumbstickFadeTweenInfo, { ImageTransparency = 0.2 }) self.endImageFadeTween:Play() for i = 1, #self.middleImages do self.middleImageFadeTweens[i] = TweenService:Create(self.middleImages[i], ThumbstickFadeTweenInfo, { ImageTransparency = MIDDLE_TRANSPARENCIES[i] }) self.middleImageFadeTweens[i]:Play() end else self.startImageFadeTween = TweenService:Create(self.startImage, ThumbstickFadeTweenInfo, { ImageTransparency = 1 }) self.startImageFadeTween:Play() self.endImageFadeTween = TweenService:Create(self.endImage, ThumbstickFadeTweenInfo, { ImageTransparency = 1 }) self.endImageFadeTween:Play() for i = 1, #self.middleImages do self.middleImageFadeTweens[i] = TweenService:Create(self.middleImages[i], ThumbstickFadeTweenInfo, { ImageTransparency = 1 }) self.middleImageFadeTweens[i]:Play() end end end function DynamicThumbstick:FadeThumbstickFrame(fadeDuration, fadeRatio) self.fadeInAndOutHalfDuration = fadeDuration * 0.5 self.fadeInAndOutBalance = fadeRatio self.tweenInAlphaStart = tick() end function DynamicThumbstick:InputInFrame(inputObject) local frameCornerTopLeft = self.thumbstickFrame.AbsolutePosition local frameCornerBottomRight = frameCornerTopLeft + self.thumbstickFrame.AbsoluteSize local inputPosition = inputObject.Position if inputPosition.X >= frameCornerTopLeft.X and inputPosition.Y >= frameCornerTopLeft.Y then if inputPosition.X <= frameCornerBottomRight.X and inputPosition.Y <= frameCornerBottomRight.Y then return true end end return false end function DynamicThumbstick:DoFadeInBackground() local playerGui = LocalPlayer:FindFirstChildOfClass("PlayerGui") local hasFadedBackgroundInOrientation = false -- only fade in/out the background once per orientation if playerGui then if playerGui.CurrentScreenOrientation == Enum.ScreenOrientation.LandscapeLeft or playerGui.CurrentScreenOrientation == Enum.ScreenOrientation.LandscapeRight then hasFadedBackgroundInOrientation = self.hasFadedBackgroundInLandscape self.hasFadedBackgroundInLandscape = true elseif playerGui.CurrentScreenOrientation == Enum.ScreenOrientation.Portrait then hasFadedBackgroundInOrientation = self.hasFadedBackgroundInPortrait self.hasFadedBackgroundInPortrait = true end end if not hasFadedBackgroundInOrientation then self.fadeInAndOutHalfDuration = FADE_IN_OUT_HALF_DURATION_DEFAULT self.fadeInAndOutBalance = FADE_IN_OUT_BALANCE_DEFAULT self.tweenInAlphaStart = tick() end end function DynamicThumbstick:DoMove(direction) local currentMoveVector = direction -- Scaled Radial Dead Zone local inputAxisMagnitude = currentMoveVector.magnitude if inputAxisMagnitude < self.radiusOfDeadZone then currentMoveVector = ZERO_VECTOR3 else currentMoveVector = currentMoveVector.unit*( 1 - math.max(0, (self.radiusOfMaxSpeed - currentMoveVector.magnitude)/self.radiusOfMaxSpeed) ) currentMoveVector = Vector3.new(currentMoveVector.x, 0, currentMoveVector.y) end self.moveVector = currentMoveVector end function DynamicThumbstick:LayoutMiddleImages(startPos, endPos) local startDist = (self.thumbstickSize / 2) + self.middleSize local vector = endPos - startPos local distAvailable = vector.magnitude - (self.thumbstickRingSize / 2) - self.middleSize local direction = vector.unit local distNeeded = self.middleSpacing * NUM_MIDDLE_IMAGES local spacing = self.middleSpacing if distNeeded < distAvailable then spacing = distAvailable / NUM_MIDDLE_IMAGES end for i = 1, NUM_MIDDLE_IMAGES do local image = self.middleImages[i] local distWithout = startDist + (spacing * (i - 2)) local currentDist = startDist + (spacing * (i - 1)) if distWithout < distAvailable then local pos = endPos - direction * currentDist local exposedFraction = math.clamp(1 - ((currentDist - distAvailable) / spacing), 0, 1) image.Visible = true image.Position = UDim2.new(0, pos.X, 0, pos.Y) image.Size = UDim2.new(0, self.middleSize * exposedFraction, 0, self.middleSize * exposedFraction) else image.Visible = false end end end function DynamicThumbstick:MoveStick(pos) local vector2StartPosition = Vector2.new(self.moveTouchStartPosition.X, self.moveTouchStartPosition.Y) local startPos = vector2StartPosition - self.thumbstickFrame.AbsolutePosition local endPos = Vector2.new(pos.X, pos.Y) - self.thumbstickFrame.AbsolutePosition self.endImage.Position = UDim2.new(0, endPos.X, 0, endPos.Y) self:LayoutMiddleImages(startPos, endPos) end function DynamicThumbstick:BindContextActions() local function inputBegan(inputObject) if self.moveTouchObject then return Enum.ContextActionResult.Pass end if not self:InputInFrame(inputObject) then return Enum.ContextActionResult.Pass end if self.isFirstTouch then self.isFirstTouch = false local tweenInfo = TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.Out,0,false,0) TweenService:Create(self.startImage, tweenInfo, {Size = UDim2.new(0, 0, 0, 0)}):Play() TweenService:Create( self.endImage, tweenInfo, {Size = UDim2.new(0, self.thumbstickSize, 0, self.thumbstickSize), ImageColor3 = Color3.new(0,0,0)} ):Play() end self.moveTouchLockedIn = false self.moveTouchObject = inputObject self.moveTouchStartPosition = inputObject.Position self.moveTouchFirstChanged = true if FADE_IN_OUT_BACKGROUND then self:DoFadeInBackground() end return Enum.ContextActionResult.Pass end local function inputChanged(inputObject) if inputObject == self.moveTouchObject then if self.moveTouchFirstChanged then self.moveTouchFirstChanged = false local startPosVec2 = Vector2.new( inputObject.Position.X - self.thumbstickFrame.AbsolutePosition.X, inputObject.Position.Y - self.thumbstickFrame.AbsolutePosition.Y ) self.startImage.Visible = true self.startImage.Position = UDim2.new(0, startPosVec2.X, 0, startPosVec2.Y) self.endImage.Visible = true self.endImage.Position = self.startImage.Position self:FadeThumbstick(true) self:MoveStick(inputObject.Position) end self.moveTouchLockedIn = true local direction = Vector2.new( inputObject.Position.x - self.moveTouchStartPosition.x, inputObject.Position.y - self.moveTouchStartPosition.y ) if math.abs(direction.x) > 0 or math.abs(direction.y) > 0 then self:DoMove(direction) self:MoveStick(inputObject.Position) end return Enum.ContextActionResult.Sink end return Enum.ContextActionResult.Pass end local function inputEnded(inputObject) if inputObject == self.moveTouchObject then self:OnInputEnded() if self.moveTouchLockedIn then return Enum.ContextActionResult.Sink end end return Enum.ContextActionResult.Pass end local function handleInput(actionName, inputState, inputObject) if inputState == Enum.UserInputState.Begin then return inputBegan(inputObject) elseif inputState == Enum.UserInputState.Change then return inputChanged(inputObject) elseif inputState == Enum.UserInputState.End then return inputEnded(inputObject) elseif inputState == Enum.UserInputState.Cancel then self:OnInputEnded() end end ContextActionService:BindActionAtPriority( DYNAMIC_THUMBSTICK_ACTION_NAME, handleInput, false, DYNAMIC_THUMBSTICK_ACTION_PRIORITY, Enum.UserInputType.Touch) end function DynamicThumbstick:Create(parentFrame) if self.thumbstickFrame then self.thumbstickFrame:Destroy() self.thumbstickFrame = nil if self.onRenderSteppedConn then self.onRenderSteppedConn:Disconnect() self.onRenderSteppedConn = nil end end self.thumbstickSize = 45 self.thumbstickRingSize = 20 self.middleSize = 10 self.middleSpacing = self.middleSize + 4 self.radiusOfDeadZone = 2 self.radiusOfMaxSpeed = 20 local screenSize = parentFrame.AbsoluteSize local isBigScreen = math.min(screenSize.x, screenSize.y) > 500 if isBigScreen then self.thumbstickSize = self.thumbstickSize * 2 self.thumbstickRingSize = self.thumbstickRingSize * 2 self.middleSize = self.middleSize * 2 self.middleSpacing = self.middleSpacing * 2 self.radiusOfDeadZone = self.radiusOfDeadZone * 2 self.radiusOfMaxSpeed = self.radiusOfMaxSpeed * 2 end local function layoutThumbstickFrame(portraitMode) if portraitMode then self.thumbstickFrame.Size = UDim2.new(1, 0, 0.4, 0) self.thumbstickFrame.Position = UDim2.new(0, 0, 0.6, 0) else self.thumbstickFrame.Size = UDim2.new(0.4, 0, 2/3, 0) self.thumbstickFrame.Position = UDim2.new(0, 0, 1/3, 0) end end self.thumbstickFrame = Instance.new("Frame") self.thumbstickFrame.BorderSizePixel = 0 self.thumbstickFrame.Name = "DynamicThumbstickFrame" self.thumbstickFrame.Visible = false self.thumbstickFrame.BackgroundTransparency = 1.0 self.thumbstickFrame.BackgroundColor3 = Color3.fromRGB(0, 0, 0) self.thumbstickFrame.Active = false layoutThumbstickFrame(false) self.startImage = Instance.new("ImageLabel") self.startImage.Name = "ThumbstickStart" self.startImage.Visible = true self.startImage.BackgroundTransparency = 1 self.startImage.Image = TOUCH_CONTROLS_SHEET self.startImage.ImageRectOffset = Vector2.new(1,1) self.startImage.ImageRectSize = Vector2.new(144, 144) self.startImage.ImageColor3 = Color3.new(0, 0, 0) self.startImage.AnchorPoint = Vector2.new(0.5, 0.5) self.startImage.Position = UDim2.new(0, self.thumbstickRingSize * 3.3, 1, -self.thumbstickRingSize * 2.8) self.startImage.Size = UDim2.new(0, self.thumbstickRingSize * 3.7, 0, self.thumbstickRingSize * 3.7) self.startImage.ZIndex = 10 self.startImage.Parent = self.thumbstickFrame self.endImage = Instance.new("ImageLabel") self.endImage.Name = "ThumbstickEnd" self.endImage.Visible = true self.endImage.BackgroundTransparency = 1 self.endImage.Image = TOUCH_CONTROLS_SHEET self.endImage.ImageRectOffset = Vector2.new(1,1) self.endImage.ImageRectSize = Vector2.new(144, 144) self.endImage.AnchorPoint = Vector2.new(0.5, 0.5) self.endImage.Position = self.startImage.Position self.endImage.Size = UDim2.new(0, self.thumbstickSize * 0.8, 0, self.thumbstickSize * 0.8) self.endImage.ZIndex = 10 self.endImage.Parent = self.thumbstickFrame for i = 1, NUM_MIDDLE_IMAGES do self.middleImages[i] = Instance.new("ImageLabel") self.middleImages[i].Name = "ThumbstickMiddle" self.middleImages[i].Visible = false self.middleImages[i].BackgroundTransparency = 1 self.middleImages[i].Image = TOUCH_CONTROLS_SHEET self.middleImages[i].ImageRectOffset = Vector2.new(1,1) self.middleImages[i].ImageRectSize = Vector2.new(144, 144) self.middleImages[i].ImageTransparency = MIDDLE_TRANSPARENCIES[i] self.middleImages[i].AnchorPoint = Vector2.new(0.5, 0.5) self.middleImages[i].ZIndex = 9 self.middleImages[i].Parent = self.thumbstickFrame end local CameraChangedConn = nil local function onCurrentCameraChanged() if CameraChangedConn then CameraChangedConn:Disconnect() CameraChangedConn = nil end local newCamera = workspace.CurrentCamera if newCamera then local function onViewportSizeChanged() local size = newCamera.ViewportSize local portraitMode = size.X < size.Y layoutThumbstickFrame(portraitMode) end CameraChangedConn = newCamera:GetPropertyChangedSignal("ViewportSize"):Connect(onViewportSizeChanged) onViewportSizeChanged() end end workspace:GetPropertyChangedSignal("CurrentCamera"):Connect(onCurrentCameraChanged) if workspace.CurrentCamera then onCurrentCameraChanged() end self.moveTouchStartPosition = nil self.startImageFadeTween = nil self.endImageFadeTween = nil self.middleImageFadeTweens = {} self.onRenderSteppedConn = RunService.RenderStepped:Connect(function() if self.tweenInAlphaStart ~= nil then local delta = tick() - self.tweenInAlphaStart local fadeInTime = (self.fadeInAndOutHalfDuration * 2 * self.fadeInAndOutBalance) self.thumbstickFrame.BackgroundTransparency = 1 - FADE_IN_OUT_MAX_ALPHA*math.min(delta/fadeInTime, 1) if delta > fadeInTime then self.tweenOutAlphaStart = tick() self.tweenInAlphaStart = nil end elseif self.tweenOutAlphaStart ~= nil then local delta = tick() - self.tweenOutAlphaStart local fadeOutTime = (self.fadeInAndOutHalfDuration * 2) - (self.fadeInAndOutHalfDuration * 2 * self.fadeInAndOutBalance) self.thumbstickFrame.BackgroundTransparency = 1 - FADE_IN_OUT_MAX_ALPHA + FADE_IN_OUT_MAX_ALPHA*math.min(delta/fadeOutTime, 1) if delta > fadeOutTime then self.tweenOutAlphaStart = nil end end end) self.onTouchEndedConn = UserInputService.TouchEnded:connect(function(inputObject) if inputObject == self.moveTouchObject then self:OnInputEnded() end end) GuiService.MenuOpened:connect(function() if self.moveTouchObject then self:OnInputEnded() end end) local playerGui = LocalPlayer:FindFirstChildOfClass("PlayerGui") while not playerGui do LocalPlayer.ChildAdded:wait() playerGui = LocalPlayer:FindFirstChildOfClass("PlayerGui") end local playerGuiChangedConn = nil local originalScreenOrientationWasLandscape = playerGui.CurrentScreenOrientation == Enum.ScreenOrientation.LandscapeLeft or playerGui.CurrentScreenOrientation == Enum.ScreenOrientation.LandscapeRight local function longShowBackground() self.fadeInAndOutHalfDuration = 2.5 self.fadeInAndOutBalance = 0.05 self.tweenInAlphaStart = tick() end playerGuiChangedConn = playerGui:GetPropertyChangedSignal("CurrentScreenOrientation"):Connect(function() if (originalScreenOrientationWasLandscape and playerGui.CurrentScreenOrientation == Enum.ScreenOrientation.Portrait) or (not originalScreenOrientationWasLandscape and playerGui.CurrentScreenOrientation ~= Enum.ScreenOrientation.Portrait) then playerGuiChangedConn:disconnect() longShowBackground() if originalScreenOrientationWasLandscape then self.hasFadedBackgroundInPortrait = true else self.hasFadedBackgroundInLandscape = true end end end) self.thumbstickFrame.Parent = parentFrame if FFlagUserDTFastInit then if game:IsLoaded() then longShowBackground() else coroutine.wrap(function() game.Loaded:Wait() longShowBackground() end)() end else spawn(function() if game:IsLoaded() then longShowBackground() else game.Loaded:wait() longShowBackground() end end) end end return DynamicThumbstick
-- When supplied, legacyCameraType is used and cameraMovementMode is ignored (should be nil anyways) -- Next, if userCameraCreator is passed in, that is used as the cameraCreator
function CameraModule:ActivateCameraController(cameraMovementMode, legacyCameraType: Enum.CameraType?) local newCameraCreator = nil if legacyCameraType~=nil then --[[ This function has been passed a CameraType enum value. Some of these map to the use of the LegacyCamera module, the value "Custom" will be translated to a movementMode enum value based on Dev and User settings, and "Scriptable" will disable the camera controller. --]] if legacyCameraType == Enum.CameraType.Scriptable then if FFlagUserFixCameraSelectModuleWarning then if self.activeCameraController then self.activeCameraController:Enable(false) self.activeCameraController = nil end return else if self.activeCameraController then self.activeCameraController:Enable(false) self.activeCameraController = nil return end end elseif legacyCameraType == Enum.CameraType.Custom then cameraMovementMode = self:GetCameraMovementModeFromSettings() elseif legacyCameraType == Enum.CameraType.Track then -- Note: The TrackCamera module was basically an older, less fully-featured -- version of ClassicCamera, no longer actively maintained, but it is re-implemented in -- case a game was dependent on its lack of ClassicCamera's extra functionality. cameraMovementMode = Enum.ComputerCameraMovementMode.Classic elseif legacyCameraType == Enum.CameraType.Follow then cameraMovementMode = Enum.ComputerCameraMovementMode.Follow elseif legacyCameraType == Enum.CameraType.Orbital then cameraMovementMode = Enum.ComputerCameraMovementMode.Orbital elseif legacyCameraType == Enum.CameraType.Attach or legacyCameraType == Enum.CameraType.Watch or legacyCameraType == Enum.CameraType.Fixed then newCameraCreator = LegacyCamera else warn("CameraScript encountered an unhandled Camera.CameraType value: ",legacyCameraType) end end if not newCameraCreator then if FFlagUserFlagEnableNewVRSystem and VRService.VREnabled then newCameraCreator = VRCamera elseif cameraMovementMode == Enum.ComputerCameraMovementMode.Classic or cameraMovementMode == Enum.ComputerCameraMovementMode.Follow or cameraMovementMode == Enum.ComputerCameraMovementMode.Default or cameraMovementMode == Enum.ComputerCameraMovementMode.CameraToggle then newCameraCreator = ClassicCamera elseif cameraMovementMode == Enum.ComputerCameraMovementMode.Orbital then newCameraCreator = OrbitalCamera else warn("ActivateCameraController did not select a module.") return end end local isVehicleCamera = self:ShouldUseVehicleCamera() if isVehicleCamera then if FFlagUserFlagEnableNewVRSystem and VRService.VREnabled then newCameraCreator = VRVehicleCamera else newCameraCreator = VehicleCamera end end -- Create the camera control module we need if it does not already exist in instantiatedCameraControllers local newCameraController if not instantiatedCameraControllers[newCameraCreator] then newCameraController = newCameraCreator.new() instantiatedCameraControllers[newCameraCreator] = newCameraController else newCameraController = instantiatedCameraControllers[newCameraCreator] if newCameraController.Reset then newCameraController:Reset() end end if self.activeCameraController then -- deactivate the old controller and activate the new one if self.activeCameraController ~= newCameraController then self.activeCameraController:Enable(false) self.activeCameraController = newCameraController self.activeCameraController:Enable(true) elseif not self.activeCameraController:GetEnabled() then self.activeCameraController:Enable(true) end elseif newCameraController ~= nil then -- only activate the new controller self.activeCameraController = newCameraController self.activeCameraController:Enable(true) end if self.activeCameraController then if cameraMovementMode~=nil then self.activeCameraController:SetCameraMovementMode(cameraMovementMode) elseif legacyCameraType~=nil then -- Note that this is only called when legacyCameraType is not a type that -- was convertible to a ComputerCameraMovementMode value, i.e. really only applies to LegacyCamera self.activeCameraController:SetCameraType(legacyCameraType) end end end
--[[ Instructions: Place both tele1 and tele2 in the same directory (e.g. both in workspace directly, or both directly in the same group or model) Otherwise it wont work. Once youve done that, jump on the teleporter to teleport to the other. If you want to edit this to a 2 way teleporter, only copy the Teleport Script of tele1 in tele2 and edit this part of the script ------------------------------------ modelname="tele2" ------------------------------------ to ------------------------------------ modelname="tele1" ------------------------------------ --]]
-- ANimation
local Sound = script:WaitForChild("Haoshoku Sound") UIS.InputBegan:Connect(function(Input) if Input.KeyCode == Enum.KeyCode.F and Debounce == 1 and Tool.Equip.Value == true and Tool.Active.Value == "None" and script.Parent.DargonOn.Value == true then Debounce = 2 Track1 = plr.Character.Dragon.Dragonoid:LoadAnimation(script.A1) Track1:Play() Fly = plr.Character.Dragon.Torso.Dragonfly Fly.MaxForce = Vector3.new(math.huge,math.huge,math.huge) for i = 1,math.huge do if Debounce == 2 then Fly.Velocity = CFrame.new(plr.Character.HumanoidRootPart.Position,Mouse.Hit.p).LookVector * 140 plr.Character.HumanoidRootPart.CFrame = CFrame.new(plr.Character.HumanoidRootPart.Position, Vector3.new(Mouse.Hit.p.x,plr.Character.HumanoidRootPart.Position.y,Mouse.Hit.p.z)) else break end wait() end end end) UIS.InputEnded:Connect(function(Input) if Input.KeyCode == Enum.KeyCode.F and Debounce == 2 and Tool.Equip.Value == true and Tool.Active.Value == "None" and script.Parent.DargonOn.Value == true then Debounce = 3 Track1:Stop() Fly.Velocity = plr.Character.HumanoidRootPart.CFrame.LookVector * 0 wait(0) Tool.Active.Value = "None" wait(0) Debounce = 1 end end)
--// Loccalllsssss
local _G, game, script, getfenv, setfenv, workspace, getmetatable, setmetatable, loadstring, coroutine, rawequal, typeof, print, math, warn, error, pcall, xpcall, select, rawset, rawget, ipairs, pairs, next, Rect, Axes, os, time, Faces, unpack, string, Color3, newproxy, tostring, tonumber, Instance, TweenInfo, BrickColor, NumberRange, ColorSequence, NumberSequence, ColorSequenceKeypoint, NumberSequenceKeypoint, PhysicalProperties, Region3int16, Vector3int16, require, table, type, wait, Enum, UDim, UDim2, Vector2, Vector3, Region3, CFrame, Ray, delay, spawn, task, tick, assert = _G, game, script, getfenv, setfenv, workspace, getmetatable, setmetatable, loadstring, coroutine, rawequal, typeof, print, math, warn, error, pcall, xpcall, select, rawset, rawget, ipairs, pairs, next, Rect, Axes, os, time, Faces, table.unpack, string, Color3, newproxy, tostring, tonumber, Instance, TweenInfo, BrickColor, NumberRange, ColorSequence, NumberSequence, ColorSequenceKeypoint, NumberSequenceKeypoint, PhysicalProperties, Region3int16, Vector3int16, require, table, type, task.wait, Enum, UDim, UDim2, Vector2, Vector3, Region3, CFrame, Ray, task.delay, task.defer, task, tick, function(cond, errMsg) return cond or error(errMsg or "assertion failed!", 2) end local SERVICES_WE_USE = table.freeze({ "Workspace", "Players", "Lighting", "ReplicatedStorage", "ReplicatedFirst", "ScriptContext", "JointsService", "LogService", "Teams", "SoundService", "StarterGui", "StarterPack", "StarterPlayer", "GroupService", "MarketplaceService", "HttpService", "TestService", "RunService", "NetworkClient", })
-------------------------
mouse.KeyDown:connect(function (key) key = string.lower(key) if key == "k" then --Camera controls if cam == ("car") then Camera.CameraSubject = player.Character.Humanoid Camera.CameraType = ("Custom") cam = ("freeplr") Camera.FieldOfView = 70 elseif cam == ("freeplr") then Camera.CameraSubject = player.Character.Humanoid Camera.CameraType = ("Attach") cam = ("lockplr") Camera.FieldOfView = 45 elseif cam == ("lockplr") then Camera.CameraSubject = carSeat Camera.CameraType = ("Custom") cam = ("car") Camera.FieldOfView = 70 end elseif key == "u" then --Window controls if windows == false then winfob.Visible = true windows = true else windows = false winfob.Visible = false end elseif key == "n" then --Dash Screen Switch if carSeat.Parent.Body.Dash.DashSc.G.Unit.Visible == false then handler:FireServer('DashSwitch', true) else end elseif key == "f" then --FM Screen Switch if carSeat.Parent.Body.Dash.Screen.G.Startup.Visible == false and carSeat.Parent.Body.Dash.Screen.G.Caution.Visible == false then handler:FireServer('FMSwitch', true) else end elseif key == "[" then -- volume down if carSeat.Parent.Body.MP.Sound.Volume >= 0 then handler:FireServer('volumedown', true) end elseif key == "]" then -- volume up if carSeat.Parent.Body.MP.Sound.Volume <= 10 then handler:FireServer('volumeup', true) end elseif key == "b" then if carSeat.Sunroof.Value == false then carSeat.Sunroof.Value = true for i,v in pairs(carSeat.Parent.Body.SR1:GetChildren()) do v.Transparency = 1 end carSeat.Sunroof.Value = true for i,v in pairs(carSeat.Parent.Body.SR2:GetChildren()) do v.Transparency = 1 end else carSeat.Sunroof.Value = false for i,v in pairs(carSeat.Parent.Body.SR1:GetChildren()) do v.Transparency = 0 carSeat.Sunroof.Value = false for i,v in pairs(carSeat.Parent.Body.SR2:GetChildren()) do v.Transparency = 0.6 end end end else end end) HUB.Limiter.MouseButton1Click:connect(function() --Ignition if carSeat.IsOn.Value == false then carSeat.IsOn.Value = true carSeat.Startup:Play() wait(1) carSeat.Chime:Play() else carSeat.IsOn.Value = false end end) TR.SN.MouseButton1Click:connect(function() --Show tracker names script.Parent.Names.Value = true end) TR.HN.MouseButton1Click:connect(function() --Hide tracker names script.Parent.Names.Value = false end) winfob.mg.Play.MouseButton1Click:connect(function() --Play the next song handler:FireServer('updateSong', winfob.mg.Input.Text) end) winfob.mg.Stop.MouseButton1Click:connect(function() --Play the next song handler:FireServer('pauseSong') end) carSeat.Indicator.Changed:connect(function() if carSeat.Indicator.Value == true then script.Parent.Indicator:Play() else script.Parent.Indicator2:Play() end end) game.Lighting.Changed:connect(function(prop) if prop == "TimeOfDay" then handler:FireServer('TimeUpdate') end end) if game.Workspace.FilteringEnabled == true then handler:FireServer('feON') elseif game.Workspace.FilteringEnabled == false then handler:FireServer('feOFF') end carSeat.LI.Changed:connect(function() if carSeat.LI.Value == true then carSeat.Parent.Body.Dash.Spd.G.Indicator.Visible = true script.Parent.HUB.Left.Visible = true else carSeat.Parent.Body.Dash.Spd.G.Indicator.Visible = false script.Parent.HUB.Left.Visible = false end end) carSeat.RI.Changed:connect(function() if carSeat.RI.Value == true then carSeat.Parent.Body.Dash.Tac.G.Indicator.Visible = true script.Parent.HUB.Right.Visible = true else carSeat.Parent.Body.Dash.Tac.G.Indicator.Visible = false script.Parent.HUB.Right.Visible = false end end) for i,v in pairs(script.Parent:getChildren()) do if v:IsA('TextButton') then v.MouseButton1Click:connect(function() if carSeat.Windows:FindFirstChild(v.Name) then local v = carSeat.Windows:FindFirstChild(v.Name) if v.Value == true then handler:FireServer('updateWindows', v.Name, false) else handler:FireServer('updateWindows', v.Name, true) end end end) end end while wait() do if carSeat.Parent:FindFirstChild("Body") then carSeat.Parent.Body.Dash.DashSc.G.Modes.SpeedStats.Speed.Text = math.floor(carSeat.Velocity.magnitude*((10/12) * (60/88))) end end
-- Testing AC FE support
local event = script.Parent local car=script.Parent.Parent local LichtNum = 0 event.OnServerEvent:connect(function(player,data) if data['ToggleLight'] then if car.Body.Light.on.Value==true then car.Body.Light.on.Value=false else car.Body.Light.on.Value=true end elseif data['EnableBrakes'] then car.Body.Brakes.on.Value=true elseif data['DisableBrakes'] then car.Body.Brakes.on.Value=false elseif data['ToggleLeftBlink'] then if car.Body.Left.on.Value==true then car.Body.Left.on.Value=false else car.Body.Left.on.Value=true end elseif data['ToggleRightBlink'] then if car.Body.Right.on.Value==true then car.Body.Right.on.Value=false else car.Body.Right.on.Value=true end elseif data['ReverseOn'] then car.Body.Reverse.on.Value=true elseif data['ReverseOff'] then car.Body.Reverse.on.Value=false elseif data['ToggleStandlicht'] then if LichtNum == 0 then LichtNum = 2 car.Body.Headlight.on.Value = true elseif LichtNum == 1 then LichtNum = 2 car.Body.Headlight.on.Value = true elseif LichtNum == 2 then LichtNum = 3 car.Body.Highlight.on.Value = true elseif LichtNum == 3 then LichtNum = 1 car.Body.Highlight.on.Value = false car.Body.Headlight.on.Value = false end end end)
-- Quick scan: -- This will just give you a brick-count and print it to your output -- Go in Solo or Online mode to get a dynamic GUI counter
local parts = {} function scan(p) for _,v in pairs(p:GetChildren()) do if (v:IsA("BasePart")) then table.insert(parts,v) end scan(v) end end scan(game.Workspace) print(#parts .. (#parts == 1 and " brick " or " bricks ") .. "counted") parts = {}
------------------------------------
function onTouched(part) --DO NOT EDIT ANYTHING FROM LINES 11-54, OR THE TELEPORTER WILL BE SEVERELY DAMAGED. if part.Parent ~= nil then local h = part.Parent:findFirstChild("Humanoid") if h~=nil then local teleportfrom=script.Parent.Enabled.Value if teleportfrom~=0 then if h==humanoid then return end local teleportto=script.Parent.Parent:findFirstChild(modelname) if teleportto~=nil then local torso = h.Parent.Torso local location = {teleportto.Position} local i = 1 local x = location[i].x local y = location[i].y local z = location[i].z x = x + math.random(-1, 1) z = z + math.random(-1, 1) y = y + math.random(2, 3) local cf = torso.CFrame local lx = 0 local ly = y local lz = 0 script.Parent.Enabled.Value=0 teleportto.Enabled.Value=0 torso.CFrame = CFrame.new(Vector3.new(x,y,z), Vector3.new(lx,ly,lz)) wait(1) script.Parent.Enabled.Value=1 teleportto.Enabled.Value=1 else print("Could not find teleporter!") end end end end end script.Parent.Touched:connect(onTouched)
-- Called when any relevant values of GameSettings or LocalPlayer change, forcing re-evalulation of -- current control scheme
function ControlModule:OnComputerMovementModeChange() local controlModule, success = self:SelectComputerMovementModule() if success then self:SwitchToController(controlModule) end end function ControlModule:OnTouchMovementModeChange() local touchModule, success = self:SelectTouchModule() if success then while not self.touchControlFrame do wait() end self:SwitchToController(touchModule) end end function ControlModule:CreateTouchGuiContainer() if self.touchGui then self.touchGui:Destroy() end -- Container for all touch device guis self.touchGui = Instance.new("ScreenGui") self.touchGui.Name = "TouchGui" self.touchGui.ResetOnSpawn = false self.touchGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling self:UpdateTouchGuiVisibility() if FFlagUserDynamicThumbstickSafeAreaUpdate then self.touchGui.ClipToDeviceSafeArea = false; end self.touchControlFrame = Instance.new("Frame") self.touchControlFrame.Name = "TouchControlFrame" self.touchControlFrame.Size = UDim2.new(1, 0, 1, 0) self.touchControlFrame.BackgroundTransparency = 1 self.touchControlFrame.Parent = self.touchGui self.touchGui.Parent = self.playerGui end function ControlModule:GetClickToMoveController() if not self.controllers[ClickToMove] then self.controllers[ClickToMove] = ClickToMove.new(CONTROL_ACTION_PRIORITY) end return self.controllers[ClickToMove] end return ControlModule.new()
-- Variables (best not to touch these!)
local button = script.Parent local car = script.Parent.Parent.Car.Value local sound = script.Parent.Start sound.Parent = car.DriveSeat -- What brick the start sound is playing from. button.MouseButton1Click:connect(function() -- Event when the button is clicked if script.Parent.Text == "Engine: Off" then -- If the text says it's off then.. sound:Play() -- Startup sound plays.. wait(1) -- For realism. Okay? script.Parent.Parent.IsOn.Value = true -- The car is is on, or in other words, start up the car. button.Text = "Engine: On" -- You don't really need this, but I would keep it. else -- If it's on then when you click the button, script.Parent.Parent.IsOn.Value = false -- The car is turned off. button.Text = "Engine: Off" end -- Don't touch this. end) -- And don't touch this either.
--[[for x = 1, 50 do s.Pitch = s.Pitch + 0.01 s:play() wait(0.001) end]]
for x = 100, 170 do s:play() wait(0.001) end for x = 100, 210 do s.Pitch = s.Pitch - 0.0031 s:play() wait(0.001) end wait() end
-- RAGDOLL A R6 CHARACTER.
local function getAttachment0(attachmentName, char) for _,child in next,char:GetChildren() do local attachment = child:FindFirstChild(attachmentName) if attachment then return attachment end end end local function ragdollPlayer(char) local head = char["Head"] local hum = char:WaitForChild("Humanoid") local leftarm = char["Left Arm"] local leftleg = char["Left Leg"] local rightleg = char["Right Leg"] local rightarm = char["Right Arm"] local torso = char.Torso hum.PlatformStand = true local root =char:FindFirstChild("HumanoidRootPart") if root ~= nil then root:Destroy() end local rootA =Instance.new("Attachment") local HeadA = Instance.new("Attachment") local LeftArmA = Instance.new("Attachment") local LeftLegA = Instance.new("Attachment") local RightArmA = Instance.new("Attachment") local RightLegA = Instance.new("Attachment") local TorsoA = Instance.new("Attachment") local TorsoA1 = Instance.new("Attachment") local TorsoA2 = Instance.new("Attachment") local TorsoA3 = Instance.new("Attachment") local TorsoA4 = Instance.new("Attachment") local TorsoA5 = Instance.new("Attachment") local function set1() HeadA.Name = "HeadA" HeadA.Parent = head HeadA.Position = Vector3.new(0, -0.5, 0) HeadA.Rotation = Vector3.new(0, 0, 0) HeadA.Axis = Vector3.new(1, 0, 0) HeadA.SecondaryAxis = Vector3.new(0, 1, 0) LeftArmA.Name = "LeftArmA" LeftArmA.Parent = leftarm LeftArmA.Position = Vector3.new(0.5, 1, 0) LeftArmA.Rotation = Vector3.new(0, 0, 0) LeftArmA.Axis = Vector3.new(1, 0, 0) LeftArmA.SecondaryAxis = Vector3.new(0, 1, 0) LeftLegA.Name = "LeftLegA" LeftLegA.Parent = leftleg LeftLegA.Position = Vector3.new(0, 1, 0) LeftLegA.Rotation = Vector3.new(0, 0, 0) LeftLegA.Axis = Vector3.new(1, 0, 0) LeftLegA.SecondaryAxis = Vector3.new(0, 1, 0) RightArmA.Name = "RightArmA" RightArmA.Parent = rightarm RightArmA.Position = Vector3.new(-0.5, 1, 0) RightArmA.Rotation = Vector3.new(0, 0, 0) RightArmA.Axis = Vector3.new(1, 0, 0) RightArmA.SecondaryAxis = Vector3.new(0, 1, 0) RightLegA.Name = "RightLegA" RightLegA.Parent = rightleg RightLegA.Position = Vector3.new(0, 1, 0) RightLegA.Rotation = Vector3.new(0, 0, 0) RightLegA.Axis = Vector3.new(1, 0, 0) RightLegA.SecondaryAxis = Vector3.new(0, 1, 0) rootA.Name= "rootA" rootA.Parent = root rootA.Position = Vector3.new(0, 0, 0) rootA.Rotation = Vector3.new(0, 90, 0) rootA.Axis = Vector3.new(0, 0, -1) rootA.SecondaryAxis = Vector3.new(0, 1, 0) end local function set2() TorsoA.Name = "TorsoA" TorsoA.Parent = torso TorsoA.Position = Vector3.new(0.5, -1, 0) TorsoA.Rotation = Vector3.new(0, 0, 0) TorsoA.Axis = Vector3.new(1, 0, 0) TorsoA.SecondaryAxis = Vector3.new(0, 1, 0) TorsoA1.Name = "TorsoA1" TorsoA1.Parent = torso TorsoA1.Position = Vector3.new(-0.5, -1, 0) TorsoA1.Rotation = Vector3.new(0, 0, 0) TorsoA1.Axis = Vector3.new(1, 0, 0) TorsoA1.SecondaryAxis = Vector3.new(0, 1, 0) TorsoA2.Name = "TorsoA2" TorsoA2.Parent = torso TorsoA2.Position = Vector3.new(-1, 1, 0) TorsoA2.Rotation = Vector3.new(0, 0, 0) TorsoA2.Axis = Vector3.new(1, 0, 0) TorsoA2.SecondaryAxis = Vector3.new(0, 1, 0) TorsoA3.Name = "TorsoA3" TorsoA3.Parent = torso TorsoA3.Position = Vector3.new(1, 1, 0) TorsoA3.Rotation = Vector3.new(0, 0, 0) TorsoA3.Axis = Vector3.new(1, 0, 0) TorsoA3.SecondaryAxis = Vector3.new(0, 1, 0) TorsoA4.Name = "TorsoA4" TorsoA4.Parent = torso TorsoA4.Position = Vector3.new(0, 1, 0) TorsoA4.Rotation = Vector3.new(0, 0, 0) TorsoA4.Axis = Vector3.new(1, 0, 0) TorsoA4.SecondaryAxis = Vector3.new(0, 1, 0) TorsoA5.Name = "TorsoA5" TorsoA5.Parent = torso TorsoA5.Position = Vector3.new(0, 0, 0) TorsoA5.Rotation = Vector3.new(0, 90, 0) TorsoA5.Axis = Vector3.new(0, 0, -1) TorsoA5.SecondaryAxis = Vector3.new(0, 1, 0) end spawn(set1) spawn(set2) --[[ local HA = Instance.new("HingeConstraint") HA.Parent = head HA.Attachment0 = HeadA HA.Attachment1 = TorsoA4 HA.Enabled = true HA.LimitsEnabled=true HA.LowerAngle=0 HA.UpperAngle=0 --]] local LAT = Instance.new("BallSocketConstraint") LAT.Parent = leftarm LAT.Attachment0 = LeftArmA LAT.Attachment1 = TorsoA2 LAT.Enabled = true LAT.LimitsEnabled=true LAT.UpperAngle=90 local RAT = Instance.new("BallSocketConstraint") RAT.Parent = rightarm RAT.Attachment0 = RightArmA RAT.Attachment1 = TorsoA3 RAT.Enabled = true RAT.LimitsEnabled=false RAT.UpperAngle=90 local HA = Instance.new("BallSocketConstraint") HA.Parent = head HA.Attachment0 = HeadA HA.Attachment1 = TorsoA4 HA.Enabled = true HA.LimitsEnabled = true HA.TwistLimitsEnabled = true HA.UpperAngle = 74 local TLL = Instance.new("BallSocketConstraint") TLL.Parent = torso TLL.Attachment0 = TorsoA1 TLL.Attachment1 = LeftLegA TLL.Enabled = true TLL.LimitsEnabled=true TLL.UpperAngle=90 local TRL = Instance.new("BallSocketConstraint") TRL.Parent = torso TRL.Attachment0 = TorsoA TRL.Attachment1 = RightLegA TRL.Enabled = true TRL.LimitsEnabled=true TRL.UpperAngle=90 local RTA = Instance.new("BallSocketConstraint") RTA.Parent = root RTA.Attachment0 = rootA RTA.Attachment1 = TorsoA5 RTA.Enabled = true RTA.LimitsEnabled=true RTA.UpperAngle=0 head.Velocity = head.CFrame.p * CFrame.new(0, -41, 0).p for _,child in next,char:GetChildren() do if child:IsA("Accoutrement") then for _,part in next,child:GetChildren() do if part:IsA("BasePart") then part.Parent = char child:remove() local attachment1 = part:FindFirstChildOfClass("Attachment") local attachment0 = getAttachment0(attachment1.Name, char) if attachment0 and attachment1 then local constraint = Instance.new("HingeConstraint") constraint.Attachment0 = attachment0 constraint.Attachment1 = attachment1 constraint.LimitsEnabled = true constraint.UpperAngle = 0 constraint.LowerAngle = 0 constraint.Parent = char end end end end end end return ragdollPlayer
-- Function called when a player character joins the game
local function onCharacterAdded(character) -- Put all of the current parts of the model into the player collision group setCollisionGroupRecursive(character, playerGroup) -- Put any part that gets added to the character later into the collision group character.DescendantAdded:Connect(function(descendant) if descendant:IsA("BasePart") then PhysicsService:SetPartCollisionGroup(descendant, playerGroup) end end) end
-- This is responsible for positioning the topbar icons
function IconController.updateTopbar(toggleTransitionInfo) local function getIncrement(otherIcon, alignment) --local container = otherIcon.instances.iconContainer --local sizeX = container.Size.X.Offset local iconSize = otherIcon:get("iconSize") or UDim2.new(0, 32, 0, 32) local sizeX = iconSize.X.Offset local alignmentGap = IconController[alignment.."Gap"] local iconWidthAndGap = (sizeX + alignmentGap) local increment = iconWidthAndGap local preOffset = 0 if otherIcon._parentIcon == nil then local extendLeft, extendRight, additionalRight = IconController.getMenuOffset(otherIcon) preOffset += extendLeft increment += extendRight + additionalRight end return increment, preOffset end if topbarUpdating then -- This prevents the topbar updating and shifting icons more than it needs to return false end coroutine.wrap(function() topbarUpdating = true runService.Heartbeat:Wait() topbarUpdating = false for alignment, alignmentInfo in pairs(alignmentDetails) do alignmentInfo.records = {} end for otherIcon, _ in pairs(topbarIcons) do if IconController.canShowIconOnTopbar(otherIcon) then local alignment = otherIcon:get("alignment") table.insert(alignmentDetails[alignment].records, otherIcon) end end local viewportSize = workspace.CurrentCamera.ViewportSize for alignment, alignmentInfo in pairs(alignmentDetails) do local records = alignmentInfo.records if #records > 1 then if alignmentInfo.reverseSort then table.sort(records, function(a,b) return a:get("order") > b:get("order") end) else table.sort(records, function(a,b) return a:get("order") < b:get("order") end) end end local totalIconX = 0 for i, otherIcon in pairs(records) do local increment = getIncrement(otherIcon, alignment) totalIconX = totalIconX + increment end local offsetX = alignmentInfo.getStartOffset(totalIconX, alignment) local preOffsetX = offsetX local containerX = TopbarPlusGui.TopbarContainer.AbsoluteSize.X for i, otherIcon in pairs(records) do local increment, preOffset = getIncrement(otherIcon, alignment) local newAbsoluteX = alignmentInfo.startScale*containerX + preOffsetX+preOffset preOffsetX = preOffsetX + increment end for i, otherIcon in pairs(records) do local container = otherIcon.instances.iconContainer local increment, preOffset = getIncrement(otherIcon, alignment) local topPadding = otherIcon.topPadding local newPositon = UDim2.new(alignmentInfo.startScale, offsetX+preOffset, topPadding.Scale, topPadding.Offset) local isAnOverflowIcon = string.match(otherIcon.name, "_overflowIcon-") if toggleTransitionInfo then tweenService:Create(container, toggleTransitionInfo, {Position = newPositon}):Play() else container.Position = newPositon end offsetX = offsetX + increment otherIcon.targetPosition = UDim2.new(0, (newPositon.X.Scale*viewportSize.X) + newPositon.X.Offset, 0, (newPositon.Y.Scale*viewportSize.Y) + newPositon.Y.Offset) end end -- OVERFLOW HANDLER -------- local START_LEEWAY = 10 -- The additional offset where the end icon will be converted to ... without an apparant change in position local function getBoundaryX(iconToCheck, side, gap) local additionalGap = gap or 0 local currentSize = iconToCheck:get("iconSize") local sizeX = currentSize.X.Offset local extendLeft, extendRight = IconController.getMenuOffset(iconToCheck) local boundaryXOffset = (side == "left" and (-additionalGap-extendLeft)) or (side == "right" and sizeX+additionalGap+extendRight) local boundaryX = iconToCheck.targetPosition.X.Offset + boundaryXOffset return boundaryX end local function getSizeX(iconToCheck, usePrevious) local currentSize, previousSize = iconToCheck:get("iconSize", nil, "beforeDropdown") local newSize = (usePrevious and previousSize) or currentSize local extendLeft, extendRight = IconController.getMenuOffset(iconToCheck) local sizeX = newSize.X.Offset + extendLeft + extendRight return sizeX end for alignment, alignmentInfo in pairs(alignmentDetails) do local overflowIcon = alignmentInfo.overflowIcon if overflowIcon then local alignmentGap = IconController[alignment.."Gap"] local oppositeAlignment = (alignment == "left" and "right") or "left" local oppositeAlignmentInfo = alignmentDetails[oppositeAlignment] local oppositeOverflowIcon = IconController.getIcon("_overflowIcon-"..oppositeAlignment) -- This determines whether any icons (from opposite or mid alignment) are overlapping with this alignment local overflowBoundaryX = getBoundaryX(overflowIcon, alignment) if overflowIcon.enabled then overflowBoundaryX = getBoundaryX(overflowIcon, oppositeAlignment, alignmentGap) end local function doesExceed(givenBoundaryX) local exceeds = (alignment == "left" and givenBoundaryX < overflowBoundaryX) or (alignment == "right" and givenBoundaryX > overflowBoundaryX) return exceeds end local alignmentOffset = oppositeAlignmentInfo.getOffset() if not overflowIcon.enabled then alignmentOffset += START_LEEWAY end local alignmentBorderX = (alignment == "left" and viewportSize.X - alignmentOffset) or (alignment == "right" and alignmentOffset) local closestBoundaryX = alignmentBorderX local exceededCriticalBoundary = doesExceed(closestBoundaryX) local function checkBoundaryExceeded(recordToCheck) local totalIcons = #recordToCheck for i = 1, totalIcons do local endIcon = recordToCheck[totalIcons+1 - i] if IconController.canShowIconOnTopbar(endIcon) then local isAnOverflowIcon = string.match(endIcon.name, "_overflowIcon-") if isAnOverflowIcon and totalIcons ~= 1 then --!!! break elseif isAnOverflowIcon and not endIcon.enabled then continue end local additionalMyX = 0 if not overflowIcon.enabled then additionalMyX = START_LEEWAY end local myBoundaryX = getBoundaryX(endIcon, alignment, additionalMyX) local isNowClosest = (alignment == "left" and myBoundaryX < closestBoundaryX) or (alignment == "right" and myBoundaryX > closestBoundaryX) if isNowClosest then closestBoundaryX = myBoundaryX if doesExceed(myBoundaryX) then exceededCriticalBoundary = true end end end end end checkBoundaryExceeded(alignmentDetails[oppositeAlignment].records) checkBoundaryExceeded(alignmentDetails.mid.records) -- This determines which icons to give to the overflow if an overlap is present if exceededCriticalBoundary then local recordToCheck = alignmentInfo.records local totalIcons = #recordToCheck for i = 1, totalIcons do local endIcon = (alignment == "left" and recordToCheck[totalIcons+1 - i]) or (alignment == "right" and recordToCheck[i]) if endIcon ~= overflowIcon and IconController.canShowIconOnTopbar(endIcon) then local additionalGap = alignmentGap local overflowIconSizeX = overflowIcon:get("iconSize").X.Offset if overflowIcon.enabled then additionalGap += alignmentGap + overflowIconSizeX end local myBoundaryXPlusGap = getBoundaryX(endIcon, oppositeAlignment, additionalGap) local exceeds = (alignment == "left" and myBoundaryXPlusGap >= closestBoundaryX) or (alignment == "right" and myBoundaryXPlusGap <= closestBoundaryX) if exceeds then if not overflowIcon.enabled then local overflowContainer = overflowIcon.instances.iconContainer local yPos = overflowContainer.Position.Y local appearXAdditional = (alignment == "left" and -overflowContainer.Size.X.Offset) or 0 local appearX = getBoundaryX(endIcon, oppositeAlignment, appearXAdditional) overflowContainer.Position = UDim2.new(0, appearX, yPos.Scale, yPos.Offset) overflowIcon:setEnabled(true) end if #endIcon.dropdownIcons > 0 then endIcon._overflowConvertedToMenu = true local wasSelected = endIcon.isSelected endIcon:deselect() local iconsToConvert = {} for _, dIcon in pairs(endIcon.dropdownIcons) do table.insert(iconsToConvert, dIcon) end for _, dIcon in pairs(endIcon.dropdownIcons) do dIcon:leave() end endIcon:setMenu(iconsToConvert) if wasSelected and overflowIcon.isSelected then endIcon:select() end end endIcon:join(overflowIcon, "dropdown") if #endIcon.menuIcons > 0 and endIcon.menuOpen then endIcon:deselect() endIcon:select() overflowIcon:select() end end break end end else -- This checks to see if the lowest/highest (depending on left/right) ordered overlapping icon is no longer overlapping, removes from the dropdown, and repeats if valid local winningOrder, winningOverlappedIcon local totalOverlappingIcons = #overflowIcon.dropdownIcons if not (oppositeOverflowIcon.enabled and #alignmentInfo.records == 1 and #oppositeAlignmentInfo.records ~= 1) then for _, overlappedIcon in pairs(overflowIcon.dropdownIcons) do local iconOrder = overlappedIcon:get("order") if winningOverlappedIcon == nil or (alignment == "left" and iconOrder < winningOrder) or (alignment == "right" and iconOrder > winningOrder) then winningOrder = iconOrder winningOverlappedIcon = overlappedIcon end end end if winningOverlappedIcon then local sizeX = getSizeX(winningOverlappedIcon, true) local myForesightBoundaryX = getBoundaryX(overflowIcon, oppositeAlignment) if totalOverlappingIcons == 1 then myForesightBoundaryX = getBoundaryX(overflowIcon, alignment, alignmentGap-START_LEEWAY) end local availableGap = math.abs(closestBoundaryX - myForesightBoundaryX) - (alignmentGap*2) local noLongerExeeds = (sizeX < availableGap) if noLongerExeeds then if #overflowIcon.dropdownIcons == 1 then overflowIcon:setEnabled(false) end local overflowContainer = overflowIcon.instances.iconContainer local yPos = overflowContainer.Position.Y overflowContainer.Position = UDim2.new(0, myForesightBoundaryX, yPos.Scale, yPos.Offset) winningOverlappedIcon:leave() -- if winningOverlappedIcon._overflowConvertedToMenu then winningOverlappedIcon._overflowConvertedToMenu = nil local iconsToConvert = {} for _, dIcon in pairs(winningOverlappedIcon.menuIcons) do table.insert(iconsToConvert, dIcon) end for _, dIcon in pairs(winningOverlappedIcon.menuIcons) do dIcon:leave() end winningOverlappedIcon:setDropdown(iconsToConvert) end -- end end end end end -------- return true end)() end function IconController.setTopbarEnabled(bool, forceBool) if forceBool == nil then forceBool = true end local indicator = TopbarPlusGui.Indicator if forceBool and not bool then forceTopbarDisabled = true elseif forceBool and bool then forceTopbarDisabled = false end if IconController.controllerModeEnabled then if bool then if TopbarPlusGui.TopbarContainer.Visible or forceTopbarDisabled or menuOpen or not checkTopbarEnabled() then return end if forceBool then indicator.Visible = checkTopbarEnabled() else if hapticService:IsVibrationSupported(Enum.UserInputType.Gamepad1) and hapticService:IsMotorSupported(Enum.UserInputType.Gamepad1,Enum.VibrationMotor.Small) then hapticService:SetMotor(Enum.UserInputType.Gamepad1,Enum.VibrationMotor.Small,1) delay(0.2,function() pcall(function() hapticService:SetMotor(Enum.UserInputType.Gamepad1,Enum.VibrationMotor.Small,0) end) end) end TopbarPlusGui.TopbarContainer.Visible = true TopbarPlusGui.TopbarContainer:TweenPosition( UDim2.new(0,0,0,5 + STUPID_CONTROLLER_OFFSET), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.1, true ) local selectIcon local targetOffset = 0 IconController:_updateSelectionGroup() runService.Heartbeat:Wait() local indicatorSizeTrip = 50 --indicator.AbsoluteSize.Y * 2 for otherIcon, _ in pairs(topbarIcons) do if IconController.canShowIconOnTopbar(otherIcon) and (selectIcon == nil or otherIcon:get("order") > selectIcon:get("order")) then selectIcon = otherIcon end local container = otherIcon.instances.iconContainer local newTargetOffset = -27 + container.AbsoluteSize.Y + indicatorSizeTrip if newTargetOffset > targetOffset then targetOffset = newTargetOffset end end if guiService:GetEmotesMenuOpen() then guiService:SetEmotesMenuOpen(false) end if guiService:GetInspectMenuEnabled() then guiService:CloseInspectMenu() end local newSelectedObject = IconController._previousSelectedObject or selectIcon.instances.iconButton IconController._setControllerSelectedObject(newSelectedObject) indicator.Image = "rbxassetid://5278151071" indicator:TweenPosition( UDim2.new(0.5,0,0,targetOffset + STUPID_CONTROLLER_OFFSET), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.1, true ) end else if forceBool then indicator.Visible = false else indicator.Visible = checkTopbarEnabled() end if not TopbarPlusGui.TopbarContainer.Visible then return end guiService.AutoSelectGuiEnabled = true IconController:_updateSelectionGroup(true) TopbarPlusGui.TopbarContainer:TweenPosition( UDim2.new(0,0,0,-TopbarPlusGui.TopbarContainer.Size.Y.Offset + STUPID_CONTROLLER_OFFSET), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.1, true, function() TopbarPlusGui.TopbarContainer.Visible = false end ) indicator.Image = "rbxassetid://5278151556" indicator:TweenPosition( UDim2.new(0.5,0,0,5), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.1, true ) end else local topbarContainer = TopbarPlusGui.TopbarContainer if checkTopbarEnabled() then topbarContainer.Visible = bool else topbarContainer.Visible = false end end end function IconController.setGap(value, alignment) local newValue = tonumber(value) or 12 local newAlignment = tostring(alignment):lower() if newAlignment == "left" or newAlignment == "mid" or newAlignment == "right" then IconController[newAlignment.."Gap"] = newValue return end IconController.leftGap = newValue IconController.midGap = newValue IconController.rightGap = newValue IconController.updateTopbar() end
--[=[ @within ClientRemoteSignal @interface Connection .Disconnect () -> nil ]=]
function ClientRemoteSignal.new(re: RemoteEvent, inboundMiddleware: Types.ClientMiddleware?, outboudMiddleware: Types.ClientMiddleware?) local self = setmetatable({}, ClientRemoteSignal) self._re = re if outboudMiddleware and #outboudMiddleware > 0 then self._hasOutbound = true self._outbound = outboudMiddleware else self._hasOutbound = false end if inboundMiddleware and #inboundMiddleware > 0 then self._directConnect = false self._signal = Signal.new() self._reConn = self._re.OnClientEvent:Connect(function(...) local args = table.pack(...) for _,middlewareFunc in ipairs(inboundMiddleware) do local middlewareResult = table.pack(middlewareFunc(args)) if not middlewareResult[1] then return end end self._signal:Fire(table.unpack(args, 1, args.n)) end) else self._directConnect = true end return self end function ClientRemoteSignal:_processOutboundMiddleware(...: any) local args = table.pack(...) for _,middlewareFunc in ipairs(self._outbound) do local middlewareResult = table.pack(middlewareFunc(args)) if not middlewareResult[1] then return table.unpack(middlewareResult, 2, middlewareResult.n) end end return table.unpack(args, 1, args.n) end
--[[Engine]]
--Torque Curve Tune.Horsepower = 3000 -- [TORQUE CURVE VISUAL] Tune.IdleRPM = 1000 -- https://www.desmos.com/calculator/2uo3hqwdhf Tune.PeakRPM = 11000 -- Use sliders to manipulate values Tune.Redline = 12000 -- Copy and paste slider values into the respective tune values Tune.EqPoint = 5500 Tune.PeakSharpness = 7.5 Tune.CurveMult = 0.16 --Incline Compensation Tune.InclineComp = 1.7 -- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees) --Misc Tune.RevAccel = 150 -- RPM acceleration when clutch is off Tune.RevDecay = 75 -- RPM decay when clutch is off Tune.RevBounce = 500 -- RPM kickback from redline Tune.IdleThrottle = 3 -- Percent throttle at idle Tune.ClutchTol = 500 -- Clutch engagement threshold (higher = faster response)
-- << VARIABLES >>
local messageContainer = Instance.new("Folder") messageContainer.Name = "MessageContainer" messageContainer.Parent = main.gui local containerFrames = {"Messages", "Hints"} for i,v in pairs(containerFrames) do local frame = Instance.new("Frame") frame.Size = UDim2.new(1,0,1,0) frame.Position = UDim2.new(0,0,0,0) frame.BackgroundTransparency = 1 frame.Name = v if v == "Hints" then local list = Instance.new("UIListLayout") list.Parent = frame end frame.Parent = messageContainer end
-- ROBLOX Services
local RunService = game:GetService('RunService') local ReplicatedStorage = game:GetService("ReplicatedStorage") local Players = game:GetService("Players") local StarterGui = game:GetService("StarterGui") local Lighting = game:GetService("Lighting")
--[[ LOWGames Studios Date: 27 October 2022 by Elder ]]
-- local u1 = nil; coroutine.wrap(function() u1 = require(game.ReplicatedStorage:WaitForChild("Framework"):WaitForChild("Library")); end)(); return function(p1) p1 = tostring(string.format("%18.0f", tonumber(p1) or 0)); p1 = (tostring(p1):reverse():gsub("(%d%d%d)", "%1,"):reverse() .. (tostring(p1):match("%.%d+") or "")):gsub("^,", ""); p1 = string.gsub(p1, "%s+", ""); local v1 if string.sub(p1, 0, 1) == "," then v1 = 2; else v1 = 0; end; p1 = string.sub(p1, v1); return p1; end;
-- Existance in this list signifies that it is an emote, the value indicates if it is a looping emote
local emoteNames = { wave = false, point = false, dance = true, dance2 = true, dance3 = true, laugh = false, cheer = false} math.randomseed(tick()) function configureAnimationSet(name, fileList) if (animTable[name] ~= nil) then for _, connection in pairs(animTable[name].connections) do connection:Disconnect() end end animTable[name] = {} animTable[name].count = 0 animTable[name].totalWeight = 0 animTable[name].connections = {} local allowCustomAnimations = true local AllowDisableCustomAnimsUserFlag = false local success, msg = pcall(function() AllowDisableCustomAnimsUserFlag = UserSettings():IsUserFeatureEnabled("UserAllowDisableCustomAnims2") end) if (AllowDisableCustomAnimsUserFlag) then local success, msg = pcall(function() allowCustomAnimations = game:GetService("StarterPlayer").AllowCustomAnimations end) if not success then allowCustomAnimations = true end end -- check for config values local config = script:FindFirstChild(name) if (allowCustomAnimations and config ~= nil) then table.insert(animTable[name].connections, config.ChildAdded:Connect(function(child) configureAnimationSet(name, fileList) end)) table.insert(animTable[name].connections, config.ChildRemoved:Connect(function(child) configureAnimationSet(name, fileList) end)) local idx = 1 for _, childPart in pairs(config:GetChildren()) do if (childPart:IsA("Animation")) then table.insert(animTable[name].connections, childPart.Changed:Connect(function(property) configureAnimationSet(name, fileList) end)) animTable[name][idx] = {} animTable[name][idx].anim = childPart local weightObject = childPart:FindFirstChild("Weight") if (weightObject == nil) then animTable[name][idx].weight = 1 else animTable[name][idx].weight = weightObject.Value end animTable[name].count = animTable[name].count + 1 animTable[name].totalWeight = animTable[name].totalWeight + animTable[name][idx].weight idx = idx + 1 end end end -- fallback to defaults if (animTable[name].count <= 0) then for idx, anim in pairs(fileList) do animTable[name][idx] = {} animTable[name][idx].anim = Instance.new("Animation") animTable[name][idx].anim.Name = name animTable[name][idx].anim.AnimationId = anim.id animTable[name][idx].weight = anim.weight animTable[name].count = animTable[name].count + 1 animTable[name].totalWeight = animTable[name].totalWeight + anim.weight
--> References
local Fountain = script.Parent local HealPart = Fountain:WaitForChild("Heal", math.huge) local BillboardGui = HealPart:WaitForChild("Attachment"):WaitForChild("BillboardGui")
--Made by Luckymaxer
Tool = script.Parent Handle = Tool:WaitForChild("Handle") Players = game:GetService("Players") UserInputService = game:GetService("UserInputService") Animations = {} Remotes = Tool:WaitForChild("Remotes") ServerControl = Remotes:WaitForChild("ServerControl") ClientControl = Remotes:WaitForChild("ClientControl") ToolEquipped = false function SetAnimation(mode, value) if not ToolEquipped or not CheckIfAlive() or not mode or not value then return end if mode == "PlayAnimation" then for i, v in pairs(Animations) do if v.Animation == value.Animation then v.AnimationTrack:Stop() table.remove(Animations, i) end end local AnimationTrack = Humanoid:LoadAnimation(value.Animation) table.insert(Animations, {Animation = value.Animation, AnimationTrack = AnimationTrack}) AnimationTrack:Play(value.FadeTime, value.Weight, value.Speed) elseif mode == "StopAnimation" and value then for i, v in pairs(Animations) do if v.Animation == value.Animation then v.AnimationTrack:Stop() table.remove(Animations, i) end end end end function CheckIfAlive() return (((Character and Character.Parent and Humanoid and Humanoid.Parent and Humanoid.Health > 0 and Torso and Torso.Parent and Player and Player.Parent) and true) or false) end function Equipped(Mouse) Character = Tool.Parent Humanoid = Character:FindFirstChild("Humanoid") Torso = Character:FindFirstChild("HumanoidRootPart") Player = Players:GetPlayerFromCharacter(Character) if not CheckIfAlive() then return end PlayerMouse = Mouse ToolEquipped = true end function Unequipped() ToolEquipped = false for i, v in pairs(Animations) do if v and v.AnimationTrack then v.AnimationTrack:Stop() end end Animations = {} end function InvokeServer(mode, value) local ServerReturn pcall(function() ServerReturn = ServerControl:InvokeServer(mode, value) end) return ServerReturn end function OnClientInvoke(mode, value) if not mode or not ToolEquipped or not CheckIfAlive() then return end if mode == "PlayAnimation" then SetAnimation("PlayAnimation", value) elseif mode == "StopAnimation" and value then SetAnimation("StopAnimation", value) elseif mode == "MouseData" then return ((PlayerMouse and {Position = PlayerMouse.Hit.p, Target = PlayerMouse.Target}) or nil) end end ClientControl.OnClientInvoke = OnClientInvoke Tool.Equipped:connect(Equipped) Tool.Unequipped:connect(Unequipped)
-- UI elements
local dlg = script.Parent local playerNameWins = dlg:FindFirstChild("PlayerNameWins") local okButton = dlg:FindFirstChild("Ok")
--[[ [Horizontal and Vertical limits for head and body tracking.] [Setting to 0 negates tracking, setting to 1 is normal tracking, and setting to anything higher than 1 goes past real life head/body rotation capabilities.] --]]
local HeadHorFactor = 1 local HeadVertFactor = 0.6 local BodyHorFactor = 2 local BodyVertFactor = 0.4
-- Decompiled with the Synapse X Luau decompiler.
local l__Players__1 = game:GetService("Players"); local u1 = { 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 = "rbxasset://sounds/action_footsteps_plastic.mp3", Looped = true, Pitch = 1.85 }, Splash = { SoundId = "rbxasset://sounds/impact_water.mp3" }, Swimming = { SoundId = "rbxasset://sounds/action_swim.mp3", Looped = true, Pitch = 1.6 } }; local l__RunService__2 = game:GetService("RunService"); local function u3(...) local u4 = { ... }; local u5 = Instance.new("BindableEvent"); local function v2(...) for v3 = 1, #u4 do u4[v3]:Disconnect(); end; return u5:Fire(...); end; for v4 = 1, #u4 do u4[v4] = u4[v4]:Connect(v2); end; return u5.Event:Wait(); end; local function u6(p1, p2, p3) local v5 = {}; for v6, v7 in pairs(u1) do local v8 = Instance.new("Sound"); v8.Name = v6; v8.Archivable = false; v8.EmitterSize = 5; v8.MaxDistance = 150; v8.Volume = 0.65; for v9, v10 in pairs(v7) do v8[v9] = v10; end; v8.Parent = p3; v5[v6] = v8; end; local u7 = {}; local v11 = { [Enum.HumanoidStateType.FallingDown] = function() local v12 = {}; for v13, v14 in pairs(u7) do v12[v13] = v14; end; for v15 in pairs(v12) do if v15 ~= nil then v15.Playing = false; u7[v15] = nil; end; end; end }; v11[Enum.HumanoidStateType.GettingUp] = function() local v16 = {}; for v17, v18 in pairs(u7) do v16[v17] = v18; end; for v19 in pairs(v16) do if v19 ~= nil then v19.Playing = false; u7[v19] = nil; end; end; local l__GettingUp__20 = v5.GettingUp; l__GettingUp__20.TimePosition = 0; l__GettingUp__20.Playing = true; end; v11[Enum.HumanoidStateType.Jumping] = function() local v21 = {}; for v22, v23 in pairs(u7) do v21[v22] = v23; end; for v24 in pairs(v21) do if v24 ~= nil then v24.Playing = false; u7[v24] = nil; end; end; local l__Jumping__25 = v5.Jumping; l__Jumping__25.TimePosition = 0; l__Jumping__25.Playing = true; end; v11[Enum.HumanoidStateType.Swimming] = function() local v26 = math.abs(p3.Velocity.Y); if v26 > 0.1 then v5.Splash.Volume = math.clamp((v26 - 100) * 0.72 / 250 + 0.28, 0, 1); local l__Splash__27 = v5.Splash; l__Splash__27.TimePosition = 0; l__Splash__27.Playing = true; end; local l__Swimming__28 = v5.Swimming; local v29 = {}; for v30, v31 in pairs(u7) do v29[v30] = v31; end; for v32 in pairs(v29) do if v32 ~= l__Swimming__28 then v32.Playing = false; u7[v32] = nil; end; end; v5.Swimming.Playing = true; u7[v5.Swimming] = true; end; v11[Enum.HumanoidStateType.Freefall] = function() v5.FreeFalling.Volume = 0; local l__FreeFalling__33 = v5.FreeFalling; local v34 = {}; for v35, v36 in pairs(u7) do v34[v35] = v36; end; for v37 in pairs(v34) do if v37 ~= l__FreeFalling__33 then v37.Playing = false; u7[v37] = nil; end; end; u7[v5.FreeFalling] = true; end; v11[Enum.HumanoidStateType.Landed] = function() local v38 = {}; for v39, v40 in pairs(u7) do v38[v39] = v40; end; for v41 in pairs(v38) do if v41 ~= nil then v41.Playing = false; u7[v41] = nil; end; end; local v42 = math.abs(p3.Velocity.Y); if v42 > 75 then v5.Landing.Volume = math.clamp((v42 - 50) * 1 / 50 + 0, 0, 1); local l__Landing__43 = v5.Landing; l__Landing__43.TimePosition = 0; l__Landing__43.Playing = true; end; end; v11[Enum.HumanoidStateType.Running] = function() local l__Running__44 = v5.Running; local v45 = {}; for v46, v47 in pairs(u7) do v45[v46] = v47; end; for v48 in pairs(v45) do if v48 ~= l__Running__44 then v48.Playing = false; u7[v48] = nil; end; end; v5.Running.Playing = true; u7[v5.Running] = true; end; v11[Enum.HumanoidStateType.Climbing] = function() local l__Climbing__49 = v5.Climbing; if math.abs(p3.Velocity.Y) > 0.1 then l__Climbing__49.Playing = true; local v50 = {}; for v51, v52 in pairs(u7) do v50[v51] = v52; end; for v53 in pairs(v50) do if v53 ~= l__Climbing__49 then v53.Playing = false; u7[v53] = nil; end; end; else local v54 = {}; for v55, v56 in pairs(u7) do v54[v55] = v56; end; for v57 in pairs(v54) do if v57 ~= nil then v57.Playing = false; u7[v57] = nil; end; end; end; u7[l__Climbing__49] = true; end; v11[Enum.HumanoidStateType.Seated] = function() local v58 = {}; for v59, v60 in pairs(u7) do v58[v59] = v60; end; for v61 in pairs(v58) do if v61 ~= nil then v61.Playing = false; u7[v61] = nil; end; end; end; v11[Enum.HumanoidStateType.Dead] = function() local v62 = {}; for v63, v64 in pairs(u7) do v62[v63] = v64; end; for v65 in pairs(v62) do if v65 ~= nil then v65.Playing = false; u7[v65] = nil; end; end; local l__Died__66 = v5.Died; l__Died__66.TimePosition = 0; l__Died__66.Playing = true; end; local v67 = { [v5.Climbing] = function(p4, p5, p6) p5.Playing = p6.Magnitude > 0.1; end, [v5.FreeFalling] = function(p7, p8, p9) if not (p9.Magnitude > 75) then p8.Volume = 0; return; end; p8.Volume = math.clamp(p8.Volume + 0.9 * p7, 0, 1); end }; v67[v5.Running] = function(p10, p11, p12) local v68 = false; if p12.Magnitude > 0.5 then v68 = p2.MoveDirection.Magnitude > 0.5; end; p11.Playing = v68; end; local v69 = { [Enum.HumanoidStateType.RunningNoPhysics] = Enum.HumanoidStateType.Running }; local v70 = {}; local u8 = v69[p2:GetState()] or p2:GetState(); local u9 = p2.StateChanged:Connect(function(p13, p14) p14 = v69[p14] and p14; if p14 ~= u8 then local v71 = v11[p14]; if v71 then v71(); end; u8 = p14; end; end); local u10 = l__RunService__2.Stepped:Connect(function(p15, p16) for v72 in pairs(u7) do local v73 = v67[v72]; if v73 then v73(p16, v72, p3.Velocity); end; end; end); local u11 = nil; local u12 = nil; local u13 = nil; u11 = p2.AncestryChanged:Connect(function(p17, p18) if not p18 then u9:Disconnect(); u10:Disconnect(); u11:Disconnect(); u12:Disconnect(); u13:Disconnect(); end; end); u12 = p3.AncestryChanged:Connect(function(p19, p20) if not p20 then u9:Disconnect(); u10:Disconnect(); u11:Disconnect(); u12:Disconnect(); u13:Disconnect(); end; end); u13 = p1.CharacterAdded:Connect(function() u9:Disconnect(); u10:Disconnect(); u11:Disconnect(); u12:Disconnect(); u13:Disconnect(); end); end; l__Players__1.PlayerAdded:Connect(function(p21) local function v74(p22) if not p22.Parent then u3(p22.AncestryChanged, p21.CharacterAdded); end; if p21.Character ~= p22 or not p22.Parent then return; end; local v75 = p22:FindFirstChildOfClass("Humanoid"); while p22:IsDescendantOf(game) and not v75 do u3(p22.ChildAdded, p22.AncestryChanged, p21.CharacterAdded); v75 = p22:FindFirstChildOfClass("Humanoid"); end; if p21.Character ~= p22 or not p22:IsDescendantOf(game) then return; end; local v76 = p22:FindFirstChild("HumanoidRootPart"); while p22:IsDescendantOf(game) and not v76 do u3(p22.ChildAdded, p22.AncestryChanged, v75.AncestryChanged, p21.CharacterAdded); v76 = p22:FindFirstChild("HumanoidRootPart"); end; if v76 and v75:IsDescendantOf(game) and p22:IsDescendantOf(game) and p21.Character == p22 then u6(p21, v75, v76); end; end; if p21.Character then v74(p21.Character); end; p21.CharacterAdded:Connect(v74); end); local v77, v78, v79 = ipairs(l__Players__1:GetPlayers()); while true do v77(v78, v79); if not v77 then break; end; v79 = v77; local function v80(p23) if not p23.Parent then u3(p23.AncestryChanged, v78.CharacterAdded); end; if v78.Character ~= p23 or not p23.Parent then return; end; local v81 = p23:FindFirstChildOfClass("Humanoid"); while p23:IsDescendantOf(game) and not v81 do u3(p23.ChildAdded, p23.AncestryChanged, v78.CharacterAdded); v81 = p23:FindFirstChildOfClass("Humanoid"); end; if v78.Character ~= p23 or not p23:IsDescendantOf(game) then return; end; local v82 = p23:FindFirstChild("HumanoidRootPart"); while p23:IsDescendantOf(game) and not v82 do u3(p23.ChildAdded, p23.AncestryChanged, v81.AncestryChanged, v78.CharacterAdded); v82 = p23:FindFirstChild("HumanoidRootPart"); end; if v82 and v81:IsDescendantOf(game) and p23:IsDescendantOf(game) and v78.Character == p23 then u6(v78, v81, v82); end; end; if v78.Character then v80(v78.Character); end; v78.CharacterAdded:Connect(v80); end;
---This Script Is Giving Us Special Gui When You Are Premium ---SG Is Here :P
-- humanoidR15AnimateLiveUpdates.lua
local Character = script.Parent local Humanoid = Character:WaitForChild("Humanoid") local pose = "Standing" local UserGameSettings = UserSettings():GetService("UserGameSettings") local userNoUpdateOnLoopSuccess, userNoUpdateOnLoopValue = pcall(function() return UserSettings():IsUserFeatureEnabled("UserNoUpdateOnLoop") end) local userNoUpdateOnLoop = userNoUpdateOnLoopSuccess and userNoUpdateOnLoopValue local userAnimateScaleRunSuccess, userAnimateScaleRunValue = pcall(function() return UserSettings():IsUserFeatureEnabled("UserAnimateScaleRun") end) local userAnimateScaleRun = userAnimateScaleRunSuccess and userAnimateScaleRunValue local AnimationSpeedDampeningObject = script:FindFirstChild("ScaleDampeningPercent") local HumanoidHipHeight = 2 local humanoidSpeed = 0 -- speed most recently sent to us from onRunning() local cachedRunningSpeed = 0 -- The most recent speed used to compute blends. Tiny variations from cachedRunningSpeed will not cause animation updates. local cachedLocalDirection = {x=0.0, y=0.0} -- unit 2D object space direction of motion local smallButNotZero = 0.0001 -- We want weights to be small but not so small the animation stops local runBlendtime = 0.2 local lastLookVector = Vector3.new(0.0, 0.0, 0.0) -- used to track whether rootPart orientation is changing. local lastBlendTime = 0 -- The last time we blended velocities local WALK_SPEED = 6.4 local RUN_SPEED = 12.8 local EMOTE_TRANSITION_TIME = 0.1 local currentAnim = "" local currentAnimInstance = nil local currentAnimTrack = nil local currentAnimKeyframeHandler = nil local currentAnimSpeed = 1.0 local PreloadedAnims = {} local animTable = {} local animNames = { idle = { { id = "http://www.roblox.com/asset/?id=507766666", weight = 1 }, { id = "http://www.roblox.com/asset/?id=507766951", weight = 1 }, { id = "http://www.roblox.com/asset/?id=507766388", weight = 9 } }, walk = { { id = "http://www.roblox.com/asset/?id=507777826", weight = 10 } }, run = { { id = "http://www.roblox.com/asset/?id=507767714", weight = 10 } }, swim = { { id = "http://www.roblox.com/asset/?id=507784897", weight = 10 } }, swimidle = { { id = "http://www.roblox.com/asset/?id=507785072", weight = 10 } }, jump = { { id = "http://www.roblox.com/asset/?id=507765000", weight = 10 } }, fall = { { id = "http://www.roblox.com/asset/?id=507767968", weight = 10 } }, climb = { { id = "http://www.roblox.com/asset/?id=507765644", weight = 10 } }, sit = { { id = "http://www.roblox.com/asset/?id=2506281703", weight = 10 } }, toolnone = { { id = "http://www.roblox.com/asset/?id=507768375", weight = 10 } }, toolslash = { { id = "http://www.roblox.com/asset/?id=522635514", weight = 10 } }, toollunge = { { id = "http://www.roblox.com/asset/?id=522638767", weight = 10 } }, wave = { { id = "http://www.roblox.com/asset/?id=507770239", weight = 10 } }, point = { { id = "http://www.roblox.com/asset/?id=507770453", weight = 10 } }, dance = { { id = "http://www.roblox.com/asset/?id=507771019", weight = 10 }, { id = "http://www.roblox.com/asset/?id=507771955", weight = 10 }, { id = "http://www.roblox.com/asset/?id=507772104", weight = 10 } }, dance2 = { { id = "http://www.roblox.com/asset/?id=507776043", weight = 10 }, { id = "http://www.roblox.com/asset/?id=507776720", weight = 10 }, { id = "http://www.roblox.com/asset/?id=507776879", weight = 10 } }, dance3 = { { id = "http://www.roblox.com/asset/?id=507777268", weight = 10 }, { id = "http://www.roblox.com/asset/?id=507777451", weight = 10 }, { id = "http://www.roblox.com/asset/?id=507777623", weight = 10 } }, laugh = { { id = "http://www.roblox.com/asset/?id=507770818", weight = 10 } }, cheer = { { id = "http://www.roblox.com/asset/?id=507770677", weight = 10 } }, } local strafingLocomotionMap = {} local fallbackLocomotionMap = {} local locomotionMap = strafingLocomotionMap
--[[ Constructs a new state object, which exposes compatibility APIs for integrating with non-reactive code. ]]
local Package = script.Parent.Parent local initDependency = require(Package.Dependencies.initDependency) local class = {} local CLASS_METATABLE = {__index = class}
-- Pre-Setup Functions
function WaitForItem(Location, Item) while (Location:FindFirstChild(Item) == nil) do wait(1) end return Location:FindFirstChild(Item) end
--//# Lighting Setup
function SetupLighting_() --//# Instances --//# Camera local ColorCorrection = Instance.new("ColorCorrectionEffect") local SunRays = Instance.new("SunRaysEffect") local Blur = Instance.new("BlurEffect") --//# Set Lighting.Brightness = 2 Lighting.EnvironmentDiffuseScale = .2 Lighting.EnvironmentSpecularScale = .82 SunRays.Parent = Lighting Blur.Size = 3.921 Blur.Parent = Lighting ColorCorrection.Parent = Lighting ColorCorrection.Saturation = .092 end
-- Decompiled with the Synapse X Luau decompiler.
local l__HDAdminMain__1 = _G.HDAdminMain; local u1 = { DoubleJumped = function(p1, p2) local u2 = true; local u3 = 0; p2:GetPropertyChangedSignal("Jump"):Connect(function() if u2 then u2 = false; u3 = u3 + 1; if u3 == 4 then p1:Fire(); end; wait(); u2 = true; wait(0.2); u3 = u3 - 1; end; end); end, EventName = function(p3, p4) end, New = function(p5, p6, p7, ...) local v2 = Instance.new("BindableEvent"); u1[p6](v2, p7, ...); v2.Parent = p7; return v2; end }; return u1;
--[[ VRVehicleCamera - Roblox VR vehicle camera control module 2021 Roblox VR --]]
local EPSILON = 1e-3 local PITCH_LIMIT = math.rad(80) local YAW_DEFAULT = math.rad(0) local ZOOM_MINIMUM = 0.5 local ZOOM_SENSITIVITY_CURVATURE = 0.5 local DEFAULT_CAMERA_DIST = 16 local TP_FOLLOW_DIST = 200 local TP_FOLLOW_ANGLE_DOT = 0.56 local VRBaseCamera = require(script.Parent:WaitForChild("VRBaseCamera")) local CameraInput = require(script.Parent:WaitForChild("CameraInput")) local CameraUtils = require(script.Parent:WaitForChild("CameraUtils")) local ZoomController = require(script.Parent:WaitForChild("ZoomController")) local VehicleCamera = require(script.Parent:WaitForChild("VehicleCamera")) local VehicleCameraCore = require(script.Parent.VehicleCamera:FindFirstChild("VehicleCameraCore")) local VehicleCameraConfig = require(script.Parent.VehicleCamera:FindFirstChild("VehicleCameraConfig")) local Players = game:GetService("Players") local RunService = game:GetService("RunService") local VRService = game:GetService("VRService") local localPlayer = Players.LocalPlayer local Spring = CameraUtils.Spring local mapClamp = CameraUtils.mapClamp local sanitizeAngle = CameraUtils.sanitizeAngle local ZERO_VECTOR3 = Vector3.new(0,0,0)
--off
script.Parent.Cover.Transparency = 1 end end)
--script.Parent.Sign.SurfaceGui.TextLabel.Text = "1 Capitol Sqr" --script.Parent.Parent.R1.BusA.Disabled = true --script.Parent.Parent.R1.BusB.Disabled = false
end if script.Parent.Value.Value == 3 then script.Parent.Sign.SurfaceGui.TextLabel.Text = "INSERT DESTINATION NAME HERE" end if script.Parent.Value.Value == 4 then script.Parent.Sign.SurfaceGui.TextLabel.Text = "INSERT DESTINATION NAME HERE" end if script.Parent.Value.Value == 5 then script.Parent.Sign.SurfaceGui.TextLabel.Text = "INSERT DESTINATION NAME HERE" end if script.Parent.Value.Value == 6 then script.Parent.Sign.SurfaceGui.TextLabel.Text = "INSERT DESTINATION NAME HERE" end if script.Parent.Value.Value == 7 then script.Parent.Sign.SurfaceGui.TextLabel.Text = "INSERT DESTINATION NAME HERE" end if script.Parent.Value.Value == 8 then script.Parent.Sign.SurfaceGui.TextLabel.Text = "INSERT DESTINATION NAME HERE" end if script.Parent.Value.Value == 9 then script.Parent.Sign.SurfaceGui.TextLabel.Text = "INSERT DESTINATION NAME HERE" end if script.Parent.Value.Value == 10 then script.Parent.Sign.SurfaceGui.TextLabel.Text = "INSERT DESTINATION NAME HERE" end if script.Parent.Value.Value == 11 then script.Parent.Sign.SurfaceGui.TextLabel.Text = "INSERT DESTINATION NAME HERE" end if script.Parent.Value.Value == 12 then script.Parent.Value.Value = 0 end if script.Parent.Value.Value == -1 then script.Parent.Value.Value = 11 end end
-- Connect functions to key events
game:GetService("UserInputService").InputBegan:Connect(handleKeyPress) game:GetService("UserInputService").InputEnded:Connect(handleKeyRelease)
--////////////////////////////// Methods --//////////////////////////////////////
local methods = {} methods.__index = methods local function CreateGuiObjects() local BaseFrame = Instance.new("Frame") BaseFrame.Selectable = false BaseFrame.Size = UDim2.new(1, 0, 1, 0) BaseFrame.BackgroundTransparency = 1 local Scroller = Instance.new("ScrollingFrame") Scroller.Selectable = ChatSettings.GamepadNavigationEnabled Scroller.Name = "Scroller" Scroller.BackgroundTransparency = 1 Scroller.BorderSizePixel = 0 Scroller.Position = UDim2.new(0, 0, 0, 3) Scroller.Size = UDim2.new(1, -4, 1, -6) Scroller.CanvasSize = UDim2.new(0, 0, 0, 0) Scroller.ScrollBarThickness = module.ScrollBarThickness Scroller.Active = true Scroller.Parent = BaseFrame local Layout = Instance.new("UIListLayout") Layout.SortOrder = Enum.SortOrder.LayoutOrder Layout.Parent = Scroller return BaseFrame, Scroller, Layout end function methods:Destroy() self.GuiObject:Destroy() self.Destroyed = true end function methods:SetActive(active) self.GuiObject.Visible = active end function methods:UpdateMessageFiltered(messageData) local messageObject = nil local searchIndex = 1 local searchTable = self.MessageObjectLog while (#searchTable >= searchIndex) do local obj = searchTable[searchIndex] if obj.ID == messageData.ID then messageObject = obj break end searchIndex = searchIndex + 1 end if messageObject then messageObject.UpdateTextFunction(messageData) self:PositionMessageLabelInWindow(messageObject, searchIndex) end end function methods:AddMessage(messageData) self:WaitUntilParentedCorrectly() local messageObject = MessageLabelCreator:CreateMessageLabel(messageData, self.CurrentChannelName) if messageObject == nil then return end table.insert(self.MessageObjectLog, messageObject) self:PositionMessageLabelInWindow(messageObject, #self.MessageObjectLog) end function methods:AddMessageAtIndex(messageData, index) local messageObject = MessageLabelCreator:CreateMessageLabel(messageData, self.CurrentChannelName) if messageObject == nil then return end table.insert(self.MessageObjectLog, index, messageObject) self:PositionMessageLabelInWindow(messageObject, index) end function methods:RemoveLastMessage() self:WaitUntilParentedCorrectly() local lastMessage = self.MessageObjectLog[1] lastMessage:Destroy() table.remove(self.MessageObjectLog, 1) end function methods:IsScrolledDown() local yCanvasSize = self.Scroller.CanvasSize.Y.Offset local yContainerSize = self.Scroller.AbsoluteWindowSize.Y local yScrolledPosition = self.Scroller.CanvasPosition.Y return (yCanvasSize < yContainerSize or yCanvasSize - yScrolledPosition <= yContainerSize + 5) end function methods:UpdateMessageTextHeight(messageObject) local baseFrame = messageObject.BaseFrame for i = 1, 10 do if messageObject.BaseMessage.TextFits then break end local trySize = self.Scroller.AbsoluteSize.X - i baseFrame.Size = UDim2.new(1, 0, 0, messageObject.GetHeightFunction(trySize)) end end function methods:PositionMessageLabelInWindow(messageObject, index) self:WaitUntilParentedCorrectly() local wasScrolledDown = self:IsScrolledDown() local baseFrame = messageObject.BaseFrame local layoutOrder = 1 if self.MessageObjectLog[index - 1] then if index == #self.MessageObjectLog then layoutOrder = self.MessageObjectLog[index - 1].BaseFrame.LayoutOrder + 1 else layoutOrder = self.MessageObjectLog[index - 1].BaseFrame.LayoutOrder end end baseFrame.LayoutOrder = layoutOrder baseFrame.Size = UDim2.new(1, 0, 0, messageObject.GetHeightFunction(self.Scroller.AbsoluteSize.X)) baseFrame.Parent = self.Scroller if messageObject.BaseMessage then self:UpdateMessageTextHeight(messageObject) end if wasScrolledDown then self.Scroller.CanvasPosition = Vector2.new( 0, math.max(0, self.Scroller.CanvasSize.Y.Offset - self.Scroller.AbsoluteSize.Y)) end end function methods:ReorderAllMessages() self:WaitUntilParentedCorrectly() --// Reordering / reparenting with a size less than 1 causes weird glitches to happen -- with scrolling as repositioning happens. if self.GuiObject.AbsoluteSize.Y < 1 then return end local oldCanvasPositon = self.Scroller.CanvasPosition local wasScrolledDown = self:IsScrolledDown() for _, messageObject in pairs(self.MessageObjectLog) do self:UpdateMessageTextHeight(messageObject) end if not wasScrolledDown then self.Scroller.CanvasPosition = oldCanvasPositon else self.Scroller.CanvasPosition = Vector2.new( 0, math.max(0, self.Scroller.CanvasSize.Y.Offset - self.Scroller.AbsoluteSize.Y)) end end function methods:Clear() for _, v in pairs(self.MessageObjectLog) do v:Destroy() end self.MessageObjectLog = {} end function methods:SetCurrentChannelName(name) self.CurrentChannelName = name end function methods:FadeOutBackground(duration) --// Do nothing end function methods:FadeInBackground(duration) --// Do nothing end function methods:FadeOutText(duration) for i = 1, #self.MessageObjectLog do if self.MessageObjectLog[i].FadeOutFunction then self.MessageObjectLog[i].FadeOutFunction(duration, CurveUtil) end end end function methods:FadeInText(duration) for i = 1, #self.MessageObjectLog do if self.MessageObjectLog[i].FadeInFunction then self.MessageObjectLog[i].FadeInFunction(duration, CurveUtil) end end end function methods:Update(dtScale) for i = 1, #self.MessageObjectLog do if self.MessageObjectLog[i].UpdateAnimFunction then self.MessageObjectLog[i].UpdateAnimFunction(dtScale, CurveUtil) end end end
-- functions
function onDied() sDied:Play() wait(2.5) script.Parent:Destroy() end function onState(state, sound) if state then sound:Play() else sound:Pause() end end function onRunning(speed) if speed>0 then sRunning:Play() else sRunning:Pause() end end
--[=[ @param motor Enum.VibrationMotor Stops the given motor. This is equivalent to calling `gamepad:SetMotor(motor, 0)`. ```lua gamepad:SetMotor(Enum.VibrationMotor.Large, 1) task.wait(0.1) gamepad:StopMotor(Enum.VibrationMotor.Large) ``` ]=]
function Gamepad:StopMotor(motor: Enum.VibrationMotor) self:SetMotor(motor, 0) end
-- ROBLOX deviation START: use custom implementations instead of unavailable node API
local helpersModule = require(CurrentModule.helpers) local format = helpersModule.format local formatWithOptions = helpersModule.formatWithOptions local WriteableModule = require(Packages.RobloxShared) type Writeable = WriteableModule.Writeable
-- Update the previous floor material and current floor material
humanoid:GetPropertyChangedSignal("FloorMaterial"):Connect(function() getFloorMaterial() getSoundProperties() update() if humanoid.MoveDirection.Magnitude > 0 then currentSound.Playing = true end end)
---- script -----
Button.Activated:Connect(function() InventoryFrame.Visible = false InformationFrame.Visible = false CaseInventoryFrame.Visible = true CaseInformationFrame.Visible = true end)
--[[ Utility script that can create a new cooldown object. ]]
local Cooldown = {}
--[[Brakes]]
-- Tune.FBrakeForce = 100 -- Front brake force Tune.RBrakeForce = 300 -- Rear brake force Tune.PBrakeForce = 100 -- Parking brake force Tune.LinkedBrakes = false -- Links brakes up, uses both brakes while braking Tune.BrakesRatio = 0 -- The ratio of the brakes (0 = rear brake; 100 = front brake)
-- Decompiled with the Synapse X Luau decompiler.
local u1 = nil; coroutine.wrap(function() u1 = require(game.ReplicatedStorage:WaitForChild("Resources")); end)(); return { Owns = function(p1, p2) if not p2 then p2 = u1.LocalPlayer; end; local v1 = u1.StatService.Get(p2); if not v1 then return; end; for v2, v3 in pairs(v1.Gamepasses) do if tostring(v3) == tostring(p1) then return true; end; end; return false; end, GetAll = function(p3) if not p3 then p3 = u1.LocalPlayer; end; local v4 = u1.StatService.Get(p3); if not v4 then return; end; return v4.Gamepasses; end };
---------------------------------- ------------FUNCTIONS------------- ----------------------------------
function Jump() local character = Player.Character if character then local humanoid = character:FindFirstChild("Humanoid") if humanoid then humanoid.Jump = true end end end function HumanoidChanged(humanoid, property) if property == "Jump" then humanoid.Jump = false elseif property == "Sit" then humanoid.Sit = true elseif property == "Parent" then Deactivate() Abort() end end function HumanoidDied() Deactivate() end function SetCamera(cframe) Camera.CameraType = Enum.CameraType.Scriptable Camera:Interpolate(cframe, cframe + cframe.lookVector, .5) --Camera.CoordinateFrame = cframe end function ReturnCamera() Camera.CameraType = Enum.CameraType.Custom end
-- Sounds
local Soundscape = game.Soundscape local CountdownBeep = Soundscape:FindFirstChild("CountdownBeep") local CountdownEndBeep = Soundscape:FindFirstChild("CountdownEndBeep")
--[[ Novena Constraint Type: Motorcycle The Bike Chassis Avxnturador | Novena --]]
local mouse = game.Players.LocalPlayer:GetMouse() script.Parent.Parent:WaitForChild("Bike") local bike = script.Parent.Parent.Bike.Value local on = script.Parent.Parent.IsOn local _Tune = require(bike["Tuner"]) if not _Tune.Engine and not _Tune.Electric then return end script.Parent:WaitForChild("TextLabel").Visible = not on.Value script.Parent.Parent.IsOn.Changed:connect(function() script.Parent.TextLabel.Visible = not on.Value end) mouse.keyDown:connect(function(k) if k=="l" then if not on.Value then script.Parent.TextLabel.Visible=false on.Value = true else on.Value = false script.Parent.TextLabel.Visible=true end end end)
--------LEFT DOOR --------
game.Workspace.doorleft.l11.BrickColor = BrickColor.new(1023) game.Workspace.doorleft.l23.BrickColor = BrickColor.new(1023) game.Workspace.doorleft.l32.BrickColor = BrickColor.new(1023) game.Workspace.doorleft.l41.BrickColor = BrickColor.new(1023) game.Workspace.doorleft.l53.BrickColor = BrickColor.new(1023) game.Workspace.doorleft.l62.BrickColor = BrickColor.new(1023) game.Workspace.doorleft.l71.BrickColor = BrickColor.new(1023) game.Workspace.doorleft.l12.BrickColor = BrickColor.new(106) game.Workspace.doorleft.l21.BrickColor = BrickColor.new(106) game.Workspace.doorleft.l33.BrickColor = BrickColor.new(106) game.Workspace.doorleft.l42.BrickColor = BrickColor.new(106) game.Workspace.doorleft.l51.BrickColor = BrickColor.new(106) game.Workspace.doorleft.l63.BrickColor = BrickColor.new(106) game.Workspace.doorleft.l72.BrickColor = BrickColor.new(106) game.Workspace.doorleft.l13.BrickColor = BrickColor.new(1013) game.Workspace.doorleft.l22.BrickColor = BrickColor.new(1013) game.Workspace.doorleft.l31.BrickColor = BrickColor.new(1013) game.Workspace.doorleft.l43.BrickColor = BrickColor.new(1013) game.Workspace.doorleft.l52.BrickColor = BrickColor.new(1013) game.Workspace.doorleft.l61.BrickColor = BrickColor.new(1013) game.Workspace.doorleft.l73.BrickColor = BrickColor.new(1013) game.Workspace.doorleft.pillar.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
--Obj
local Frame local RenderDist = {} function RenderDist:Setup(UI) Frame = UI Frame.Text.FocusLost:Connect(function() local text = math.clamp(tonumber(Frame.Text.Text), 20, self.Modules.Entity.EntitySettings.CacheRemoveDist - 1) if (text) then Frame.Text.Text = text self.Modules.Entity.EntitySettings.MaxRenderDist = text else Frame.Text.Text = self.Modules.Entity.EntitySettings.MaxRenderDist end end) end return RenderDist
-- When character sits, make it go oof!
Humanoid.StateChanged:Connect(function(_, state) if state == Enum.HumanoidStateType.Seated then Humanoid:TakeDamage(Humanoid.Health) end end)
-- Only used in www builds.
exports.enableSchedulerDebugging = false
--[[Chassis Assembly]]
--Create Steering Axle local arm=Instance.new("Part") arm.Name="Arm" arm.Anchored=true arm.CanCollide=false arm.FormFactor=Enum.FormFactor.Custom arm.Size=Vector3.new(_Tune.AxleSize,_Tune.AxleSize,_Tune.AxleSize) arm.CFrame=(v.CFrame*CFrame.new(0,_Tune.StAxisOffset,0))*CFrame.Angles(-math.pi/2,-math.pi/2,0) arm.CustomPhysicalProperties = PhysicalProperties.new(_Tune.AxleDensity,0,0,100,100) arm.TopSurface=Enum.SurfaceType.Smooth arm.BottomSurface=Enum.SurfaceType.Smooth arm.Transparency=1 arm.Parent = v --Create Wheel Spindle local base=arm:Clone() base.Parent=v base.Name="Base" base.CFrame=base.CFrame*CFrame.new(0,_Tune.AxleSize,0) base.BottomSurface=Enum.SurfaceType.Hinge --Create Steering Anchor local axle=arm:Clone() axle.Parent=v axle.Name="Axle" axle.CFrame=CFrame.new(v.Position-((v.CFrame*CFrame.Angles(math.pi/2,0,0)).lookVector*((v.Size.x/2)+(axle.Size.x/2))),v.Position)*CFrame.Angles(0,math.pi,0) axle.BackSurface=Enum.SurfaceType.Hinge if v.Name=="F" or v.Name=="R" then local axle2=arm:Clone() axle2.Parent=v axle2.Name="Axle" axle2.CFrame=CFrame.new(v.Position+((v.CFrame*CFrame.Angles(math.pi/2,0,0)).lookVector*((v.Size.x/2)+(axle2.Size.x/2))),v.Position)*CFrame.Angles(0,math.pi,0) axle2.BackSurface=Enum.SurfaceType.Hinge MakeWeld(arm,axle2) end --Create Suspension if PGS_ON and _Tune.SusEnabled then local sa=arm:Clone() sa.Parent=v sa.Name="#SA" if v.Name == "FL" or v.Name=="FR" or v.Name =="F" then local aOff = _Tune.FAnchorOffset sa.CFrame=v.CFrame*CFrame.new(_Tune.AxleSize/2,-fDistX,-fDistY)*CFrame.new(aOff[3],aOff[1],-aOff[2])*CFrame.Angles(-math.pi/2,-math.pi/2,0) else local aOff = _Tune.RAnchorOffset sa.CFrame=v.CFrame*CFrame.new(_Tune.AxleSize/2,-rDistX,-rDistY)*CFrame.new(aOff[3],aOff[1],-aOff[2])*CFrame.Angles(-math.pi/2,-math.pi/2,0) end local sb=sa:Clone() sb.Parent=v sb.Name="#SB" sb.CFrame=sa.CFrame*CFrame.new(0,0,_Tune.AxleSize) sb.FrontSurface=Enum.SurfaceType.Hinge local g = Instance.new("BodyGyro") g.Name = "Stabilizer" g.MaxTorque = Vector3.new(0,0,1) g.P = 0 g.Parent = sb local sf1 = Instance.new("Attachment") sf1.Name = "SAtt" sf1.Parent = sa local sf2 = sf1:Clone() sf2.Parent = sb if v.Name == "FL" or v.Name == "FR" or v.Name == "F" then sf1.Position = Vector3.new(fDistX-fSLX,-fDistY+fSLY,_Tune.AxleSize/2) sf2.Position = Vector3.new(fDistX,-fDistY,-_Tune.AxleSize/2) elseif v.Name == "RL" or v.Name=="RR" or v.Name == "R" then sf1.Position = Vector3.new(rDistX-rSLX,-rDistY+rSLY,_Tune.AxleSize/2) sf2.Position = Vector3.new(rDistX,-rDistY,-_Tune.AxleSize/2) end sb:MakeJoints() local sp = Instance.new("SpringConstraint") sp.Name = "Spring" sp.Attachment0 = sf1 sp.Attachment1 = sf2 sp.LimitsEnabled = true sp.Visible=_Tune.SusVisible sp.Radius=_Tune.SusRadius sp.Thickness=_Tune.SusThickness sp.Color=BrickColor.new(_Tune.SusColor) sp.Coils=_Tune.SusCoilCount if v.Name == "FL" or v.Name=="FR" or v.Name =="F" then g.D = _Tune.FAntiRoll sp.Damping = _Tune.FSusDamping sp.Stiffness = _Tune.FSusStiffness sp.FreeLength = _Tune.FSusLength+_Tune.FPreCompress sp.MaxLength = _Tune.FSusLength+_Tune.FExtensionLim sp.MinLength = _Tune.FSusLength-_Tune.FCompressLim else g.D = _Tune.RAntiRoll sp.Damping = _Tune.RSusDamping sp.Stiffness = _Tune.RSusStiffness sp.FreeLength = _Tune.RSusLength+_Tune.RPreCompress sp.MaxLength = _Tune.RSusLength+_Tune.RExtensionLim sp.MinLength = _Tune.RSusLength-_Tune.RCompressLim end sp.Parent = v MakeWeld(car.DriveSeat,sa) MakeWeld(sb,base) else MakeWeld(car.DriveSeat,base) end --Lock Rear Steering Axle if v.Name == "RL" or v.Name == "RR" or v.Name=="R" then MakeWeld(base,axle) end --Weld Assembly if v.Parent.Name == "RL" or v.Parent.Name == "RR" or v.Name=="R" then MakeWeld(car.DriveSeat,arm) end MakeWeld(arm,axle) arm:MakeJoints() axle:MakeJoints() --Weld Miscelaneous Parts if v:FindFirstChild("SuspensionFixed")~=nil then ModelWeld(v.SuspensionFixed,car.DriveSeat) end if v:FindFirstChild("WheelFixed")~=nil then ModelWeld(v.WheelFixed,axle) end if v:FindFirstChild("Fixed")~=nil then ModelWeld(v.Fixed,arm) end --Weld Wheel Parts if v:FindFirstChild("Parts")~=nil then ModelWeld(v.Parts,v) end --Add Steering Gyro if v:FindFirstChild("Steer") then v:FindFirstChild("Steer"):Destroy() end if v.Name=="FL" or v.Name=="FR" or v.Name=="F" then local steer=Instance.new("BodyGyro") steer.Name="Steer" steer.P=_Tune.SteerP steer.D=_Tune.SteerD steer.MaxTorque=Vector3.new(0,_Tune.SteerMaxTorque,0) steer.cframe=v.CFrame*CFrame.Angles(0,-math.pi/2,0) steer.Parent = arm end --Add Stabilization Gyro local gyro=Instance.new("BodyGyro") gyro.Name="Stabilizer" gyro.MaxTorque=Vector3.new(1,0,1) gyro.P=0 if v.Name=="FL" or v.Name=="FR" or v.Name=="F" then gyro.D=_Tune.FGyroDamp else gyro.D=_Tune.RGyroDamp end gyro.Parent = v --Add Rotational BodyMover local AV=Instance.new("BodyAngularVelocity") AV.Name="#AV" AV.angularvelocity=Vector3.new(0,0,0) AV.maxTorque=Vector3.new(_Tune.PBrakeForce,0,_Tune.PBrakeForce) AV.P=1e9 AV.Parent = v end
-- KeyBinding
if KEY1 then ContextActionService:BindAction("ToggleInteraction", toggleKeyboard, false, KEY1) end
--health.Changed:connect(function() --root.Velocity = Vector3.new(0,5000,0) --end)
local anims = {} local lastAttack= tick() local target,targetType local lastLock = tick() local fleshDamage = 15 local structureDamage = 10 local path = nil for _,animObject in next,animations do anims[animObject.Name] = hum:LoadAnimation(animObject) end function Attack(thing,dmg) if tick()-lastAttack > 2 then hum:MoveTo(root.Position) lastAttack = tick() anims.AntWalk:Stop() anims.AntMelee:Play() if thing.ClassName == "Player" then root.FleshHit:Play() ant:SetPrimaryPartCFrame(CFrame.new(root.Position,Vector3.new(target.Character.PrimaryPart.Position.X,root.Position.Y,target.Character.PrimaryPart.Position.Z))) elseif thing.ClassName == "Model" then root.StructureHit:Play() end rep.Events.NPCAttack:Fire(thing,dmg) end end function Move(point) hum:MoveTo(point) if not anims.AntWalk.IsPlaying then anims.AntWalk:Play() end end function ScanForPoint() local newPoint local rayDir = Vector3.new(math.random(-100,100)/100,0,math.random(-100,100)/100) local ray = Ray.new(root.Position,rayDir*math.random(10,50),ant) local part,pos = workspace:FindPartOnRay(ray) Move(pos) enRoute = true end
---------------------------------------------
SignalValues.Signal1.Value = 1 SignalValues.Signal1a.Value = 1 SignalValues.Signal2.Value = 3 SignalValues.Signal2a.Value = 3 PedValues.PedSignal1.Value = 3 PedValues.PedSignal1a.Value = 3 PedValues.PedSignal2.Value = 1 PedValues.PedSignal2a.Value = 1 TurnValues.TurnSignal1.Value = 3 TurnValues.TurnSignal1a.Value = 3 TurnValues.TurnSignal2.Value = 3 TurnValues.TurnSignal2a.Value = 3 wait(26)--Green Time (BEGIN SIGNAL1 GREEN) SignalValues.Signal1.Value = 1 SignalValues.Signal1a.Value = 1 SignalValues.Signal2.Value = 3 SignalValues.Signal2a.Value = 3 PedValues.PedSignal1.Value = 3 PedValues.PedSignal1a.Value = 3 PedValues.PedSignal2.Value = 2 PedValues.PedSignal2a.Value = 2 TurnValues.TurnSignal1.Value = 3 TurnValues.TurnSignal1a.Value = 3 TurnValues.TurnSignal2.Value = 3 TurnValues.TurnSignal2a.Value = 3 wait(6) -- Green Time + Time for flashing pedestrian signals SignalValues.Signal1.Value = 2 SignalValues.Signal1a.Value = 2 SignalValues.Signal2.Value = 3 SignalValues.Signal2a.Value = 3 PedValues.PedSignal1.Value = 3 PedValues.PedSignal1a.Value = 3 PedValues.PedSignal2.Value = 3 PedValues.PedSignal2a.Value = 3 TurnValues.TurnSignal1.Value = 3 TurnValues.TurnSignal1a.Value = 3 TurnValues.TurnSignal2.Value = 3 TurnValues.TurnSignal2a.Value = 3 wait(4) -- Yellow Time SignalValues.Signal1.Value = 3 SignalValues.Signal1a.Value = 3 SignalValues.Signal2.Value = 3 SignalValues.Signal2a.Value = 3 PedValues.PedSignal1.Value = 3 PedValues.PedSignal1a.Value = 3 PedValues.PedSignal2.Value = 3 PedValues.PedSignal2a.Value = 3 TurnValues.TurnSignal1.Value = 3 TurnValues.TurnSignal1a.Value = 3 TurnValues.TurnSignal2.Value = 3 TurnValues.TurnSignal2a.Value = 3 wait(2)-- ALL RED SignalValues.Signal1.Value = 3 SignalValues.Signal1a.Value = 3 SignalValues.Signal2.Value = 3 SignalValues.Signal2a.Value = 3 PedValues.PedSignal1.Value = 3 PedValues.PedSignal1a.Value = 3 PedValues.PedSignal2.Value = 3 PedValues.PedSignal2a.Value = 3 TurnValues.TurnSignal1.Value = 3 TurnValues.TurnSignal1a.Value = 3 TurnValues.TurnSignal2.Value = 3 TurnValues.TurnSignal2a.Value = 3 wait(2)-- ALL RED SignalValues.Signal1.Value = 3 SignalValues.Signal1a.Value = 3 SignalValues.Signal2.Value = 3 SignalValues.Signal2a.Value = 3 PedValues.PedSignal1.Value = 3 PedValues.PedSignal1a.Value = 3 PedValues.PedSignal2.Value = 3 PedValues.PedSignal2a.Value = 3 TurnValues.TurnSignal1.Value = 3 TurnValues.TurnSignal1a.Value = 3 TurnValues.TurnSignal2.Value = 1 TurnValues.TurnSignal2a.Value = 1 wait(12)-- Simultaneous Turn Green SignalValues.Signal1.Value = 3 SignalValues.Signal1a.Value = 3 SignalValues.Signal2.Value = 3 SignalValues.Signal2a.Value = 3 PedValues.PedSignal1.Value = 3 PedValues.PedSignal1a.Value = 3 PedValues.PedSignal2.Value = 3 PedValues.PedSignal2a.Value = 3 TurnValues.TurnSignal1.Value = 3 TurnValues.TurnSignal1a.Value = 3 TurnValues.TurnSignal2.Value = 2 TurnValues.TurnSignal2a.Value = 2 wait(4)-- Simultaneous Turn Yellow SignalValues.Signal1.Value = 3 SignalValues.Signal1a.Value = 3 SignalValues.Signal2.Value = 3 SignalValues.Signal2a.Value = 3 PedValues.PedSignal1.Value = 3 PedValues.PedSignal1a.Value = 3 PedValues.PedSignal2.Value = 3 PedValues.PedSignal2a.Value = 3 TurnValues.TurnSignal1.Value = 3 TurnValues.TurnSignal1a.Value = 3 TurnValues.TurnSignal2.Value = 3 TurnValues.TurnSignal2a.Value = 3 wait(2)-- ALL RED SignalValues.Signal1.Value = 3 SignalValues.Signal1a.Value = 3 SignalValues.Signal2.Value = 1 SignalValues.Signal2a.Value = 1 PedValues.PedSignal1.Value = 1 PedValues.PedSignal1a.Value = 1 PedValues.PedSignal2.Value = 3 PedValues.PedSignal2a.Value = 3 TurnValues.TurnSignal1.Value = 3 TurnValues.TurnSignal1a.Value = 3 TurnValues.TurnSignal2.Value = 3 TurnValues.TurnSignal2a.Value = 3 wait(26)--Green Time (BEGIN SIGNAL2 GREEN) SignalValues.Signal1.Value = 3 SignalValues.Signal1a.Value = 3 SignalValues.Signal2.Value = 1 SignalValues.Signal2a.Value = 1 PedValues.PedSignal1.Value = 2 PedValues.PedSignal1a.Value = 2 PedValues.PedSignal2.Value = 3 PedValues.PedSignal2a.Value = 3 TurnValues.TurnSignal1.Value = 3 TurnValues.TurnSignal1a.Value = 3 TurnValues.TurnSignal2.Value = 3 TurnValues.TurnSignal2a.Value = 3 wait(6) -- Green Time + Time for flashing pedestrian signals SignalValues.Signal1.Value = 3 SignalValues.Signal1a.Value = 3 SignalValues.Signal2.Value = 2 SignalValues.Signal2a.Value = 2 PedValues.PedSignal1.Value = 3 PedValues.PedSignal1a.Value = 3 PedValues.PedSignal2.Value = 3 PedValues.PedSignal2a.Value = 3 TurnValues.TurnSignal1.Value = 3 TurnValues.TurnSignal1a.Value = 3 TurnValues.TurnSignal2.Value = 3 TurnValues.TurnSignal2a.Value = 3 wait(4) -- Yellow Time SignalValues.Signal1.Value = 3 SignalValues.Signal1a.Value = 3 SignalValues.Signal2.Value = 3 SignalValues.Signal2a.Value = 3 PedValues.PedSignal1.Value = 3 PedValues.PedSignal1a.Value = 3 PedValues.PedSignal2.Value = 3 PedValues.PedSignal2a.Value = 3 TurnValues.TurnSignal1.Value = 3 TurnValues.TurnSignal1a.Value = 3 TurnValues.TurnSignal2.Value = 3 TurnValues.TurnSignal2a.Value = 3 wait(2)-- ALL RED SignalValues.Signal1.Value = 3 SignalValues.Signal1a.Value = 3 SignalValues.Signal2.Value = 3 SignalValues.Signal2a.Value = 3 PedValues.PedSignal1.Value = 3 PedValues.PedSignal1a.Value = 3 PedValues.PedSignal2.Value = 3 PedValues.PedSignal2a.Value = 3 TurnValues.TurnSignal1.Value = 1 TurnValues.TurnSignal1a.Value = 1 TurnValues.TurnSignal2.Value = 3 TurnValues.TurnSignal2a.Value = 3 wait(12)-- Simultaneous Turn Green SignalValues.Signal1.Value = 3 SignalValues.Signal1a.Value = 3 SignalValues.Signal2.Value = 3 SignalValues.Signal2a.Value = 3 PedValues.PedSignal1.Value = 3 PedValues.PedSignal1a.Value = 3 PedValues.PedSignal2.Value = 3 PedValues.PedSignal2a.Value = 3 TurnValues.TurnSignal1.Value = 2 TurnValues.TurnSignal1a.Value = 2 TurnValues.TurnSignal2.Value = 3 TurnValues.TurnSignal2a.Value = 3 wait(4)-- Simultaneous Turn Yellow SignalValues.Signal1.Value = 3 SignalValues.Signal1a.Value = 3 SignalValues.Signal2.Value = 3 SignalValues.Signal2a.Value = 3 PedValues.PedSignal1.Value = 3 PedValues.PedSignal1a.Value = 3 PedValues.PedSignal2.Value = 3 PedValues.PedSignal2a.Value = 3 TurnValues.TurnSignal1.Value = 3 TurnValues.TurnSignal1a.Value = 3 TurnValues.TurnSignal2.Value = 3 TurnValues.TurnSignal2a.Value = 3 wait(2)-- ALL RED end
--------------------) Settings
Damage = 0 -- the ammout of health the player or mob will take Cooldown = 0 -- cooldown for use of the tool again ZoneModelName = "Spike zone" -- name the zone model MobHumanoidName = "Humanoid"-- the name of player or mob u want to damage
-- !! This is the uneditable piece. !!
randomize = math.random(1,#colortable) for index, child in pairs(tgt:GetChildren()) do -- Generic for, yay! if child:IsA("BasePart") and child.Name == paintpart then -- This will root out false positives child.BrickColor = BrickColor.new(colortable[randomize]) else end end print("Painted car '" .. tgt.Name .. "' " .. colortable[randomize] .. ". Destroying script") script:Destroy()
--!strict --[=[ @function every @within Array @param array {T} -- The array to check. @param predicate (value: T, index: number, array: {T}) -> any -- The predicate to use to check the array. @return boolean -- Whether every item in the array passes the predicate. Checks whether every item in the array passes the predicate. ```lua local array = { 1, 2, 3 } local value = Every(array, function(item, index) return item > 0 end) -- true local value = Every(array, function(item, index) return item > 1 end) -- false ``` ]=]
local function every<T>(array: { T }, predicate: (value: T, index: number, array: { T }) -> any): boolean for index, value in ipairs(array) do if not predicate(value, index, array) then return false end end return true end return every
--------------------) Settings
Damage = 0 -- the ammout of health the player or mob will take Cooldown = 1 -- cooldown for use of the tool again ZoneModelName = "Hard zone of bone" -- name the zone model MobHumanoidName = "Humanoid"-- the name of player or mob u want to damage
-- Code to continue tracking & jumping on Active Mobs
task.defer(function() while true do task.wait(1/4) for MobInstance, Mob in ActiveMobs do task.spawn(function() if not Mob.isDead and not Mob.Destroyed then local Player, m = AI:GetClosestPlayer(Mob) local Enemy = Mob.Enemy -- Simulation if Mob.Root.Anchored then Mob.Root.Anchored = false end if not Mob.Root:GetNetworkOwner() then Mob.Root:SetNetworkOwner(Player) task.wait(0.05) -- Give physics more time so it doesn't appear as choppy end -- Tracking if Player and Enemy then Enemy:MoveTo(Player.Character:GetPivot().Position, Player.Character.PrimaryPart) else ActiveMobs[MobInstance] = nil Mob.Root:SetNetworkOwner() Enemy:MoveTo(Mob.Origin.Position) end -- Jumping AI:RequestJump(Mob) else ActiveMobs[MobInstance] = nil end end) end end end) return AI
--- Encode/compress
Compress.Encode = function(str) --- Vars local convertedToJSON = false --- Convert table to JSON if type(str) == "table" then --- Attempt to conver to JSON local success = pcall(function() str = _L.Services.HttpService:JSONEncode(str) convertedToJSON = true end) --- Failed to encode to JSON (userdata or empty?) if (not success) or (not str) then _L.Print("Failed to convert table to string", true) return end end --- Compress string local encoded = Encode(str) if utf8.len(str) > utf8.len(encoded) then --- Successfully compressed return encoded else --- Size of compressed string larger than original return str, convertedToJSON end end
--[[Transmission]]
Tune.TransModes = {"Semi", "Auto"} --[[ [Modes] "Auto" : Automatic shifting "Semi" : Clutchless manual shifting, dual clutch transmission "Manual" : Manual shifting with clutch >Include within brackets eg: {"Semi"} or {"Auto", "Manual"} >First mode is default mode ]] --Automatic Settings Tune.AutoShiftMode = "RPM" --[[ [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) Tune.ShiftTime = 0 -- The time delay in which you initiate a shift and the car changes gear --Gear Ratios Tune.FinalDrive = 3.21 -- [TRANSMISSION CALCULATIONS FOR NERDS] Tune.Ratios = { -- SPEED [SPS] = (Wheel diameter(studs) * pi(3.14) * RPM) / (60 * Gear Ratio * Final Drive * Multiplier) --[[Reverse]] 5.000 ,-- WHEEL TORQUE = Engine Torque * Gear Ratio * Final Drive * Multiplier --[[Neutral]] 0 , --[[ 1 ]] 3.519 , --[[ 2 ]] 2.320 , --[[ 3 ]] 1.700 , --[[ 4 ]] 1.400 , --[[ 5 ]] 0.907 , } Tune.FDMult = 1.3 -- Ratio multiplier (Change this value instead of FinalDrive if car is struggling with torque ; Default = 1)
-- Public Constructors
function RadioButtonGroupClass.new(frame, radioButtons) local self = setmetatable({}, RadioButtonGroupClass) self._Maid = Lazy.Utilities.Maid.new() self._ChangedBind = Instance.new("BindableEvent") self._ActiveRadio = radioButtons[1] self.Frame = frame self.RadioButtons = radioButtons self.Changed = self._ChangedBind.Event init(self) return self end function RadioButtonGroupClass.Create(list, max) local radios = {} local function instanceFunc(index, option) local radio = Lazy.Classes.RadioButtonLabel.Create(option) radio.Frame.LayoutOrder = index radios[index] = radio return radio.Frame end local frame = Lazy.Constructors.List.Create(list, max or #list, Enum.FillDirection.Vertical, UDim.new(0, 5), instanceFunc) return RadioButtonGroupClass.new(frame, radios) end
-- Main class constructor
function Main.new(player, data) for _, v in statesTemplate:GetChildren() do v:Clone().Parent = player end local dataScope = data.Main local self = {} self.Data = dataScope self._player = player self.JoinTime = os.time() self.LastPlayTime = dataScope.LastPlayTime self.FirstJoinTime = dataScope.FirstJoinTime setmetatable(self, Main) return self end
--------------------mods
local maincf = CFrame.new() --weapon offset of camera local guncf = CFrame.new() --weapon offset of camera local larmcf = CFrame.new() --left arm offset of weapon local rarmcf = CFrame.new() --right arm offset of weapon local gunbobcf = CFrame.new() local recoilcf = CFrame.new() local aimcf = CFrame.new() local AimTween = TweenInfo.new( 0.3, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 0, false, 0 ) local Ignore_Model = {cam,char,ACS_Workspace.Client,ACS_Workspace.Server} local ModStorageFolder = plr.PlayerGui:FindFirstChild('ModStorage') or Instance.new('Folder') ModStorageFolder.Parent = plr.PlayerGui ModStorageFolder.Name = 'ModStorage' function RAND(Min, Max, Accuracy) local Inverse = 1 / (Accuracy or 1) return (math.random(Min * Inverse, Max * Inverse) / Inverse) end SE_GUI = HUDs:WaitForChild("StatusUI"):Clone() SE_GUI.Parent = plr.PlayerGui local BloodScreen = TS:Create(SE_GUI.Efeitos.Health, TweenInfo.new(1,Enum.EasingStyle.Circular,Enum.EasingDirection.InOut,-1,true), {Size = UDim2.new(1.2,0,1.4,0)}) local BloodScreenLowHP = TS:Create(SE_GUI.Efeitos.LowHealth, TweenInfo.new(1,Enum.EasingStyle.Circular,Enum.EasingDirection.InOut,-1,true), {Size = UDim2.new(1.2,0,1.4,0)}) local Crosshair = SE_GUI.Crosshair local RecoilSpring = SpringMod.new(Vector3.new()) RecoilSpring.d = .1 RecoilSpring.s = 20 local cameraspring = SpringMod.new(Vector3.new()) cameraspring.d = .5 cameraspring.s = 20 local SwaySpring = SpringMod.new(Vector3.new()) SwaySpring.d = 0.25 SwaySpring.s = 20 local TWAY, XSWY, YSWY = 0,0,0 local oldtick = tick() local xTilt = 0 local yTilt = 0 local lastPitch = 0 local lastYaw = 0 local Stance = Evt.Stance local Stances = 0 local Virar = 0 local CameraX = 0 local CameraY = 0 local Sentado = false local Swimming = false local falling = false local cansado = false local Crouched = false local Proned = false local Steady = false local CanLean = true local ChangeStance = true
--[[Weight and CG]]
Tune.Weight = 12000 -- Total weight (in pounds) Tune.WeightBSize = { -- Size of weight brick (dimmensions in studs ; larger = more stable) --[[Width]] 8 , --[[Height]] 4 , --[[Length]] 26 } Tune.WeightDist = 60 -- Weight distribution (0 - on rear wheels, 100 - on front wheels, can be <0 or >100) Tune.CGHeight = 1 -- Center of gravity height (studs relative to median of all wheels) Tune.WBVisible = false -- Makes the weight brick visible --Unsprung Weight Tune.FWheelDensity = .5 -- Front Wheel Density Tune.RWheelDensity = .5 -- Rear Wheel Density Tune.FWLgcyDensity = 1 -- Front Wheel Density [PGS OFF] Tune.RWLgcyDensity = 1 -- Rear Wheel Density [PGS OFF] Tune.AxleSize = 2 -- Size of structural members (larger = more stable/carry more weight) Tune.AxleDensity = .1 -- Density of structural members
-- This script will increase every character's walkspeed to 60
function edit(h) if h ~= nil then h.WalkSpeed = 60 end end while true do cur = game.Players:GetChildren() for i = 1, #cur do edit(cur[i].Character.Humanoid) wait(0.1) end wait(4) end
-- Update the position of the confetti.
function _Confetti:Update(paramDeltaTime) if (self.Enabled and self.OutOfBounds) then --self.Label.ImageColor3 = self.Color; self.Position = Vector2.new(0,0); self.Power = Vector2.new(self.EmitterPower.X + math.random(10)-5, self.EmitterPower.Y + math.random(10)-5); self.Cycles = self.Cycles + 1; end; if ( (not(self.Enabled) and self.OutOfBounds) or (not(self.Enabled) and (self.Cycles == 0))) then self.Label.Visible = false; self.OutOfBounds = true; --self.Color = colors[math.random(#colors)]; return; else self.Label.Visible = true; end; local startPosition, currentPosition, currentPower = self.EmitterPosition, self.Position, self.Power; local imageLabel = self.Label; -- Apply change. if (imageLabel) then -- Update position. local newPosition = Vector2.new(currentPosition.X - currentPower.X, currentPosition.Y - currentPower.Y); local newPower = Vector2.new((currentPower.X/1.09) - gravity.X, (currentPower.Y/1.1) - gravity.Y); local ViewportSize = Camera.ViewportSize; imageLabel.Position = UDim2.new(startPosition.X, newPosition.X, startPosition.Y, newPosition.Y); self.OutOfBounds = (imageLabel.AbsolutePosition.X > ViewportSize.X and gravity.X > 0) or (imageLabel.AbsolutePosition.Y > ViewportSize.Y and gravity.Y > 0) or (imageLabel.AbsolutePosition.X < 0 and gravity.X < 0) or (imageLabel.AbsolutePosition.Y < 0 and gravity.Y < 0); self.Position, self.Power = newPosition, newPower; -- Start spinning if it's reached max height. if (newPower.Y < 0) then if (self.Size <= 0) then self.Side = 1; --imageLabel.ImageColor3 = self.Color; end; if (self.Size >= self.DefaultSize) then self.Side = -1; --imageLabel.ImageColor3 = Color3.new(self.Color.r * 0.65, self.Color.g * 0.65, self.Color.b * 0.65); end; self.Size = self.Size + (self.Side * 2); imageLabel.Size = UDim2.new(0, self.DefaultSize, 0, self.Size); end; 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
MakeWeld(car.Misc.HighRiser.base,car.DriveSeat) MakeWeld(car.Misc.HighRiser.H1.bracket1,car.Misc.HighRiser.H1.part2) MakeWeld(car.Misc.HighRiser.H1.bracket1,car.Misc.HighRiser.H1.part1) MakeWeld(car.Misc.HighRiser.H2.bracket2,car.Misc.HighRiser.H2.part2) MakeWeld(car.Misc.HighRiser.H2.bracket2,car.Misc.HighRiser.H2.part1) MakeWeld(car.Misc.HighRiser.H1.part0,car.Misc.HighRiser.H1.part1,"Motor",.02).Name="Motor" MakeWeld(car.Misc.HighRiser.H2.part0,car.Misc.HighRiser.H2.part1,"Motor",.02).Name="Motor" MakeWeld(car.Misc.HighRiser.H1.part0,car.Misc.HighRiser.base) MakeWeld(car.Misc.HighRiser.H2.part0,car.Misc.HighRiser.base)
-- Add Points:
function PointsService:AddPoints(player, amount) local points = self:GetPoints(player) points += amount self.PointsPerPlayer[player] = points if (amount ~= 0) then self.PointsChanged:Fire(player, points) self.Client.PointsChanged:Fire(player, points) end if (points > self.Client.MostPoints:Get()) then self.Client.MostPoints:Set(points) end end
--[[* * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. ]]
local CurrentModule = script.Parent local Packages = CurrentModule.Parent local LuauPolyfill = require(Packages.LuauPolyfill) local Array = LuauPolyfill.Array local Object = LuauPolyfill.Object local Set = LuauPolyfill.Set local WeakMap = LuauPolyfill.WeakMap type Array<T> = LuauPolyfill.Array<T> type Set<T> = LuauPolyfill.Set<T> type WeakMap<T, U> = LuauPolyfill.WeakMap<T, U> local exports = {}
--/Other
module.EnableLaser = true module.EnableFlashlight = true module.InfraRed = true
--[[ The entry point for the Fusion library. ]]
local PubTypes = require(script.PubTypes) local restrictRead = require(script.Utility.restrictRead) export type StateObject<T> = PubTypes.StateObject<T> export type CanBeState<T> = PubTypes.CanBeState<T> export type Symbol = PubTypes.Symbol export type Value<T> = PubTypes.Value<T> export type Computed<T> = PubTypes.Computed<T> export type ForPairs<KO, VO> = PubTypes.ForPairs<KO, VO> export type ForKeys<KI, KO> = PubTypes.ForKeys<KI, KO> export type ForValues<VI, VO> = PubTypes.ForKeys<VI, VO> export type Observer = PubTypes.Observer export type Tween<T> = PubTypes.Tween<T> export type Spring<T> = PubTypes.Spring<T> type Fusion = { version: PubTypes.Version, New: (className: string) -> ((propertyTable: PubTypes.PropertyTable) -> Instance), Hydrate: (target: Instance) -> ((propertyTable: PubTypes.PropertyTable) -> Instance), Ref: PubTypes.SpecialKey, Cleanup: PubTypes.SpecialKey, Children: PubTypes.SpecialKey, Out: PubTypes.SpecialKey, OnEvent: (eventName: string) -> PubTypes.SpecialKey, OnChange: (propertyName: string) -> PubTypes.SpecialKey, Value: <T>(initialValue: T) -> Value<T>, Computed: <T>(callback: () -> T, destructor: (T) -> ()?) -> Computed<T>, ForPairs: <KI, VI, KO, VO, M>(inputTable: CanBeState<{[KI]: VI}>, processor: (KI, VI) -> (KO, VO, M?), destructor: (KO, VO, M?) -> ()?) -> ForPairs<KO, VO>, ForKeys: <KI, KO, M>(inputTable: CanBeState<{[KI]: unknown}>, processor: (KI) -> (KO, M?), destructor: (KO, M?) -> ()?) -> ForKeys<KO, unknown>, ForValues: <VI, VO, M>(inputTable: CanBeState<{[unknown]: VI}>, processor: (VI) -> (VO, M?), destructor: (VO, M?) -> ()?) -> ForValues<unknown, VO>, Observer: (watchedState: StateObject<unknown>) -> Observer, Tween: <T>(goalState: StateObject<T>, tweenInfo: TweenInfo?) -> Tween<T>, Spring: <T>(goalState: StateObject<T>, speed: number?, damping: number?) -> Spring<T>, cleanup: (...unknown) -> (), doNothing: (...unknown) -> () } return restrictRead("Fusion", { version = {major = 0, minor = 2, isRelease = true}, New = require(script.Instances.New), Hydrate = require(script.Instances.Hydrate), Ref = require(script.Instances.Ref), Out = require(script.Instances.Out), Cleanup = require(script.Instances.Cleanup), Children = require(script.Instances.Children), OnEvent = require(script.Instances.OnEvent), OnChange = require(script.Instances.OnChange), Value = require(script.State.Value), Computed = require(script.State.Computed), ForPairs = require(script.State.ForPairs), ForKeys = require(script.State.ForKeys), ForValues = require(script.State.ForValues), Observer = require(script.State.Observer), Tween = require(script.Animation.Tween), Spring = require(script.Animation.Spring), cleanup = require(script.Utility.cleanup), doNothing = require(script.Utility.doNothing) }) :: Fusion
--// All global vars will be wiped/replaced except script
return function(data) local gui = client.UI.Prepare(script.Parent.Parent) -- Change it to a TextLabel to avoid chat clearing local playergui = service.PlayerGui local frame = gui.Frame local msg = gui.Frame.Message local ttl = gui.Frame.Title local gIndex = data.gIndex local gTable = data.gTable local title = data.Title local message = data.Message local scroll = data.Scroll local tim = data.Time if not data.Message or not data.Title then gui:Destroy() end ttl.Text = title msg.Text = message ttl.TextTransparency = 1 msg.TextTransparency = 1 ttl.TextStrokeTransparency = 1 msg.TextStrokeTransparency = 1 frame.BackgroundTransparency = 1 local blur = service.New("BlurEffect") blur.Enabled = false blur.Size = 0 blur.Parent = workspace.CurrentCamera local fadeSteps = 10 local blurSize = 10 local textFade = 0.1 local strokeFade = 0.5 local frameFade = 0.3 local blurStep = blurSize/fadeSteps local frameStep = frameFade/fadeSteps local textStep = 0.1 local strokeStep = 0.1 local gone = false local function fadeIn() if not gone then blur.Enabled = true gTable:Ready() --gui.Parent = service.PlayerGui for i = 1,fadeSteps do if blur.Size<blurSize then blur.Size = blur.Size+blurStep end if msg.TextTransparency>textFade then msg.TextTransparency = msg.TextTransparency-textStep ttl.TextTransparency = ttl.TextTransparency-textStep end if msg.TextStrokeTransparency>strokeFade then msg.TextStrokeTransparency = msg.TextStrokeTransparency-strokeStep ttl.TextStrokeTransparency = ttl.TextStrokeTransparency-strokeStep end if frame.BackgroundTransparency>frameFade then frame.BackgroundTransparency = frame.BackgroundTransparency-frameStep end wait(1/60) end end end local function fadeOut() if not gone then for i = 1,fadeSteps do if blur.Size>0 then blur.Size = blur.Size-blurStep end if msg.TextTransparency<1 then msg.TextTransparency = msg.TextTransparency+textStep ttl.TextTransparency = ttl.TextTransparency+textStep end if msg.TextStrokeTransparency<1 then msg.TextStrokeTransparency = msg.TextStrokeTransparency+strokeStep ttl.TextStrokeTransparency = ttl.TextStrokeTransparency+strokeStep end if frame.BackgroundTransparency<1 then frame.BackgroundTransparency = frame.BackgroundTransparency+frameStep end wait(1/60) end blur.Enabled = false blur:Destroy() service.UnWrap(gui):Destroy() gone = true end end gTable.CustomDestroy = function() if not gone then gone = true pcall(fadeOut) end pcall(function() service.UnWrap(gui):Destroy() end) pcall(function() blur:Destroy() end) end --[[if not scroll then msg.Text = message else Routine(function() wait(0.5) for i = 1, #message do msg.Text = msg.Text .. message:sub(i,i) wait(0.05) end end) end--]] -- For now? fadeIn() wait(tim or 5) if not gone then fadeOut() end --[[ frame.Position = UDim2.new(0.5,-175,-1.5,0) gui.Parent = playergui frame:TweenPosition(UDim2.new(0.5,-175,0.25,0),nil,nil,0.5) if not scroll then msg.Text = message wait(tim or 10) else wait(0.5) for i = 1, #message do msg.Text = msg.Text .. message:sub(i,i) wait(0.05) end wait(tim or 5) end if frame then frame:TweenPosition(UDim2.new(0.5,-175,-1.5,0),nil,nil,0.5) wait(1) gui:Destroy() end --]] end