prompt
stringlengths
2
14.7k
completion
stringlengths
1
99.7k
-- Thourough check to see if a character is sitting
local function amISitting(character) return character.Humanoid.SeatPart ~= nil end
-- Number of bullets in a clip
local ClipSize = 1000
--[[ Constructs a new computed state object, which follows the value of another state object using a spring simulation. ]]
local Package = script.Parent.Parent local logError = require(Package.Logging.logError) local unpackType = require(Package.Animation.unpackType) local SpringScheduler = require(Package.Animation.SpringScheduler) local useDependency = require(Package.Dependencies.useDependency) local initDependency = require(Package.Dependencies.initDependency) local updateAll = require(Package.Dependencies.updateAll) local class = {} local CLASS_METATABLE = {__index = class} local WEAK_KEYS_METATABLE = {__mode = "k"} local ENABLE_PARAM_SETTERS = false
-- / Configuration / --
local Configurations = GameAssets.Configurations local DefaultMapConfiguration = Configurations.DefaultMapConfiguration
-- declarations
local Figure = script.Parent local Torso = waitForChild(Figure, "Torso") local RightShoulder = waitForChild(Torso, "Right Shoulder") local LeftShoulder = waitForChild(Torso, "Left Shoulder") local RightHip = waitForChild(Torso, "Right Hip") local LeftHip = waitForChild(Torso, "Left Hip") local Neck = waitForChild(Torso, "Neck") local Humanoid = waitForChild(Figure, "Humanoid") local pose = "Standing" local toolAnim = "None" local toolAnimTime = 0 local jumpMaxLimbVelocity = 0.75
-- Gradually regenerates the Humanoid's Health over time.
local REGEN_RATE = 1/2000 -- Regenerate this fraction of MaxHealth per second. local REGEN_STEP = 1 -- Wait this long between each regeneration step.
--//ENGINE//--
Horsepower = 170 --{This is how much power your engine block makes ALONE, this does not represent to total horsepower output [IF you have a turbo/SC]} EngineDisplacement = 2200 --{Engine size in CC's} EngineType = "Petrol" --{Petrol, Diesel, Electric] EngineLocation = "Front" --{Front, Mid, Rear} ForcedInduction = "Natural" --{Natural, Single, Twin, Supercharger} InductionPartSize = 1 --{0-5, 1 being small, 5 being large (Decimals accepted, e.g 2.64 turbo size, this is the size of the turbo} ElectronicallyLimited = false --{Electronically Limit the top speed of your vehicle} LimitSpeedValue = 100 --{Limits top speed of the vehicle [In MPH]}
-- Touching this Battle Armor doubles you MaxHealth and heals you to full power
local debounce = false function getPlayer(humanoid) -- find the owning player of a humanoid. local players = game.Players:children() for i = 1, #players do if players[i].Character ~= nil then if players[i].Character.Humanoid == humanoid then return players[i] end end end return nil end function putOnArmor(humanoid) local torso = humanoid.Parent.Torso torso.Reflectance = .6 humanoid.MaxHealth = 200 local player = getPlayer(humanoid) if player ~= nil then local message = Instance.new("Message") message.Text = "You found Battle Armor!" message.Parent = player wait(5) message.Text = "Max Health Doubled!" wait(5) message.Parent = nil end end function hasArmor(humanoid) return (humanoid.MaxHealth > 100) end function onTouched(hit) local humanoid = hit.Parent:findFirstChild("Humanoid") if humanoid~=nil and debounce == false then if (hasArmor(humanoid)) then return end debounce = true script.Parent.Parent = nil putOnArmor(humanoid) debounce = false end end script.Parent.Touched:connect(onTouched)
-- / REs / --
local PlayerEvent = game.ReplicatedStorage:WaitForChild(Character.Name)
--This only works under StarterGui, The main code is located under the local script.
script.Chat.Disabled = false script.PlayerSent.OnServerEvent:Connect(function(player,msg) print(player,msg) --code when received command end)
--script.Parent.Activated:Connect(function() -- game.ReplicatedStorage.SendGiftType:FireServer("claim", script.Username.Value, script.Parent.Name) -- subtractGiftCount() -- game.SoundService.Success:Play() -- script.Parent:Destroy() --end)
--[[ Generates symbols used to denote property change handlers when working with the `New` function. ]]
local Package = script.Parent.Parent local PubTypes = require(Package.PubTypes) local function OnChange(propertyName: string): PubTypes.OnChangeKey return { type = "Symbol", name = "OnChange", key = propertyName } end return OnChange
--Move this script to Workspace.
function onPlayerEntered(player) player.Chatted:connect(function(msg) if msg == "!REJOIN" then game:GetService("TeleportService"):Teleport(game.PlaceId, player) if player.Character ~= nil then player.Character:remove() end end end) end game.Players.PlayerAdded:connect(onPlayerEntered)
--[[** <description> Sets the value of the result in the database with the key and the new value. Attempts to get the value from the data store. Does not call functions fired on update. </description> <parameter name = "key"> The key to set. </parameter> <parameter name = "newValue"> The value to set. </parameter> **--]]
function DataStore:SetKeyValue(key, newValue) if not self.value then self.value = self:Get({}) end self.value[key] = newValue end local CombinedDataStore = {} do function CombinedDataStore:BeforeInitialGet(modifier) self.combinedBeforeInitialGet = modifier end function CombinedDataStore:BeforeSave(modifier) self.combinedBeforeSave = modifier end function CombinedDataStore:Get(defaultValue, dontAttemptGet) local tableResult = self.combinedStore:Get({}) local tableValue = tableResult[self.combinedName] if not dontAttemptGet then if tableValue == nil then tableValue = defaultValue else if self.combinedBeforeInitialGet and not self.combinedInitialGot then tableValue = self.combinedBeforeInitialGet(tableValue) end end end self.combinedInitialGot = true tableResult[self.combinedName] = clone(tableValue) self.combinedStore:Set(tableResult, true) return tableValue end function CombinedDataStore:Set(value, dontCallOnUpdate) local tableResult = self.combinedStore:GetTable({}) tableResult[self.combinedName] = value self.combinedStore:Set(tableResult, dontCallOnUpdate) self:_Update(dontCallOnUpdate) end function CombinedDataStore:Update(updateFunc) self:Set(updateFunc(self:Get())) self:_Update() end function CombinedDataStore:OnUpdate(callback) if not self.onUpdateCallbacks then self.onUpdateCallbacks = { callback } else self.onUpdateCallbacks[#self.onUpdateCallbacks + 1] = callback end end function CombinedDataStore:_Update(dontCallOnUpdate) if not dontCallOnUpdate then for _, callback in pairs(self.onUpdateCallbacks or {}) do callback(self:Get(), self) end end self.combinedStore:_Update(true) end function CombinedDataStore:SetBackup(retries) self.combinedStore:SetBackup(retries) end end local DataStoreMetatable = {} DataStoreMetatable.__index = DataStore
--[=[ Registers a callback that runs when an unhandled rejection happens. An unhandled rejection happens when a Promise is rejected, and the rejection is not observed with `:catch`. The callback is called with the actual promise that rejected, followed by the rejection values. @since v3.2.0 @param callback (promise: Promise, ...: any) -- A callback that runs when an unhandled rejection happens. @return () -> () -- Function that unregisters the `callback` when called ]=]
function Promise.onUnhandledRejection(callback) table.insert(Promise._unhandledRejectionCallbacks, callback) return function() local index = table.find(Promise._unhandledRejectionCallbacks, callback) if index then table.remove(Promise._unhandledRejectionCallbacks, index) end end end return Promise
-- g.MaxTorque=Vector3.new(math.abs(carSeat.CFrame.lookVector.X),math.abs(carSeat.CFrame.lookVector.Y*1),math.abs(carSeat.CFrame.lookVector.Z))*600
if ks.CanCollide == true then carSeat.Parent.Body.KW.swag.BodyThrust.force = Vector3.new(0,-50,0) else carSeat.Parent.Body.KW.swag.BodyThrust.force = Vector3.new(0,0,0) end if carSeat.Throttle == 1 and Burnout == 1 then wheel2.Smoke.Enabled = true wheel2.Smoke.Opacity = (speedw/50) wheel2.Smoke.RiseVelocity = (speedw/100) else wheel2.Smoke.Enabled = false end if carSeat.Throttle == -1 then carSeat.Parent.Body.Lights.Brake.Material = "Neon" carSeat.Parent.Body.Lights.Brake.BrickColor = BrickColor.new("Really red") else carSeat.Parent.Body.Lights.Brake.Material = "SmoothPlastic" carSeat.Parent.Body.Lights.Brake.BrickColor = BrickColor.new("Pearl") end end
--[[ FUNCTIONS ]]
-- Players.PlayerAdded:connect(function(player) -- player Joins Game if player.MembershipType == Enum.MembershipType.Premium then -- if they are premium --[[ EXTRA PLAYER LEADERSTATS]]-- local AddedGems = 15 -- how many points to add player.leaderstats.Gems.Value = player.leaderstats.Gems.Value + AddedGems -- adding The Points everytime they join the game -- || CHANGE NAME HERE ^^^^^ AND CHANGE ^^ IF ITS DIFFERENT || -- --[[ EXTRA PLAYER GEAR ]]-- local starterGear = player:WaitForChild("StarterGear") -- starter gear local specialTool = ServerStorage:FindFirstChild("Tool"):Clone() -- getting special tool specialTool.Parent = starterGear -- setting parent to starter gear --[[ EXTRA HEALTH/SUPER POWERS (COMMENT OUT IF YOU DON'T WANT IT) ]] -- player.CharacterAdded:connect(function(char) local humanoid = char:findFirstChild("Humanoid") if humanoid then humanoid.MaxHealth = 300 humanoid.Health = humanoid.MaxHealth humanoid.WalksSpeed = 100 humanoid.JumpPower = 250 end end) end end)
--[[ userInput.TouchLongPress:Connect(function(touchPositions, state, processed) if (processed or state ~= Enum.UserInputState.Begin) then return end Mobile.SwitchView = true end) ]]
return Mobile
-- options -------------------------
setupmode = "Manual" -- Manual or Auto (if you want to pick what plugins you have yourself or you want it to be automated) soundplugin = "SoundSuite" -- StockSound, SoundSuite or 1.5 Sound (no others are supported, sorry!) (MANUAL ONLY) camkey = "v" -- the key you use for first person camera level = 50 -- 0% - 100% exceptions = {"Pedal","Shift"} -- put names of audios to ignore here (AUTO ONLY)
--[=[ @param name string @param inboundMiddleware ClientMiddleware? @param outboundMiddleware ClientMiddleware? @return ClientRemoteSignal Returns a new ClientRemoteSignal that mirrors the matching RemoteSignal created by ServerComm with the same matching `name`. ]=]
function ClientComm:GetSignal(name: string, inboundMiddleware: ClientMiddleware?, outboundMiddleware: ClientMiddleware?) return Comm.Client.GetSignal(self._instancesFolder, name, inboundMiddleware, outboundMiddleware) end
--[[ ControlModule - This ModuleScript implements a singleton class to manage the selection, activation, and deactivation of the current character movement controller. This script binds to RenderStepped at Input priority and calls the Update() methods on the active controller instances. The character controller ModuleScripts implement classes which are instantiated and activated as-needed, they are no longer all instantiated up front as they were in the previous generation of PlayerScripts. 2018 PlayerScripts Update - AllYourBlox --]]
local ControlModule = {} ControlModule.__index = ControlModule
--[[ END OF SERVICES ]]
local LocalPlayer = PlayersService.LocalPlayer while LocalPlayer == nil do PlayersService.ChildAdded:wait() LocalPlayer = PlayersService.LocalPlayer end local PlayerGui = LocalPlayer:WaitForChild("PlayerGui") local okShouldClipInGameChat, valueShouldClipInGameChat = pcall(function() return UserSettings():IsUserFeatureEnabled("UserShouldClipInGameChat") end) local shouldClipInGameChat = okShouldClipInGameChat and valueShouldClipInGameChat
--////////////////////////////// Include --//////////////////////////////////////
local Chat = game:GetService("Chat") local clientChatModules = Chat:WaitForChild("ClientChatModules") local modulesFolder = script.Parent local moduleChannelsTab = require(modulesFolder:WaitForChild("ChannelsTab")) local MessageSender = require(modulesFolder:WaitForChild("MessageSender")) local ChatSettings = require(clientChatModules:WaitForChild("ChatSettings")) local CurveUtil = require(modulesFolder:WaitForChild("CurveUtil"))
--// Firemode Functions
function CreateBullet(L_200_arg1) local L_201_ = L_59_.Position local L_202_ = (L_4_.Hit.p - L_201_).unit local L_203_ = CFrame.Angles(math.rad(math.random(-L_200_arg1, L_200_arg1)), math.rad(math.random(-L_200_arg1, L_200_arg1)), math.rad(math.random(-L_200_arg1, L_200_arg1))) L_202_ = L_203_ * L_202_ local L_204_ = CFrame.new(L_201_, L_201_ + L_202_) local L_205_ = Instance.new("Part", L_101_) game.Debris:AddItem(L_205_, 10) L_205_.Shape = Enum.PartType.Ball L_205_.Size = Vector3.new(1, 1, 12) L_205_.Name = "Bullet" L_205_.TopSurface = "Smooth" L_205_.BottomSurface = "Smooth" L_205_.BrickColor = BrickColor.new("Bright green") L_205_.Material = "Neon" L_205_.CanCollide = false --Bullet.CFrame = FirePart.CFrame + (Grip.CFrame.p - Grip.CFrame.p) L_205_.CFrame = L_204_ local L_206_ = Instance.new("Sound") L_206_.SoundId = "rbxassetid://341519743" L_206_.Looped = true L_206_:Play() L_206_.Parent = L_205_ L_206_.Volume = 0.4 L_206_.MaxDistance = 30 L_205_.Transparency = 1 local L_207_ = L_205_:GetMass() local L_208_ = Instance.new('BodyForce', L_205_) if not L_83_ then L_208_.Force = L_24_.BulletPhysics L_205_.Velocity = L_202_ * L_24_.BulletSpeed else L_208_.Force = L_24_.ExploPhysics L_205_.Velocity = L_202_ * L_24_.ExploSpeed end local L_209_ = Instance.new('Attachment', L_205_) L_209_.Position = Vector3.new(0.1, 0, 0) local L_210_ = Instance.new('Attachment', L_205_) L_210_.Position = Vector3.new(-0.1, 0, 0) local L_211_ = TracerCalculation() if L_24_.TracerEnabled == true and L_211_ then local L_212_ = Instance.new('Trail', L_205_) L_212_.Attachment0 = L_209_ L_212_.Attachment1 = L_210_ L_212_.Transparency = NumberSequence.new(L_24_.TracerTransparency) L_212_.LightEmission = L_24_.TracerLightEmission L_212_.TextureLength = L_24_.TracerTextureLength L_212_.Lifetime = L_24_.TracerLifetime L_212_.FaceCamera = L_24_.TracerFaceCamera L_212_.Color = ColorSequence.new(L_24_.TracerColor.Color) end if L_1_:FindFirstChild('Shell') and not L_83_ then CreateShell() end delay(0.2, function() L_205_.Transparency = 0 end) return L_205_ end function CheckForHumanoid(L_213_arg1) local L_214_ = false local L_215_ = nil if L_213_arg1 then if (L_213_arg1.Parent:FindFirstChild("Humanoid") or L_213_arg1.Parent.Parent:FindFirstChild("Humanoid")) then L_214_ = true if L_213_arg1.Parent:FindFirstChild('Humanoid') then L_215_ = L_213_arg1.Parent.Humanoid elseif L_213_arg1.Parent.Parent:FindFirstChild('Humanoid') then L_215_ = L_213_arg1.Parent.Parent.Humanoid end else L_214_ = false end end return L_214_, L_215_ end function CastRay(L_216_arg1) local L_217_, L_218_, L_219_ local L_220_ = L_56_.Position; local L_221_ = L_216_arg1.Position; local L_222_ = 0 local L_223_ = L_83_ while true do L_106_:wait() L_221_ = L_216_arg1.Position; L_222_ = L_222_ + (L_221_ - L_220_).magnitude L_217_, L_218_, L_219_ = workspace:FindPartOnRayWithIgnoreList(Ray.new(L_220_, (L_221_ - L_220_)), IgnoreList); local L_224_ = Vector3.new(0, 1, 0):Cross(L_219_) local L_225_ = math.asin(L_224_.magnitude) -- division by 1 is redundant if L_222_ > L_24_.BulletDecay then L_216_arg1:Destroy() break end if L_217_ and (L_217_ and L_217_.Transparency >= 1 or L_217_.CanCollide == false) and L_217_.Name ~= 'Right Arm' and L_217_.Name ~= 'Left Arm' and L_217_.Name ~= 'Right Leg' and L_217_.Name ~= 'Left Leg' and L_217_.Name ~= 'Armor' then table.insert(IgnoreList, L_217_) end if L_217_ then L_224_ = Vector3.new(0, 1, 0):Cross(L_219_) L_225_ = math.asin(L_224_.magnitude) -- division by 1 is redundant L_118_:FireServer(L_218_) local L_226_ = CheckForHumanoid(L_217_) if L_226_ == false then L_216_arg1:Destroy() local L_227_ = L_113_:InvokeServer(L_218_, L_224_, L_225_, L_219_, "Part", L_217_) elseif L_226_ == true then L_216_arg1:Destroy() local L_228_ = L_113_:InvokeServer(L_218_, L_224_, L_225_, L_219_, "Human", L_217_) end end if L_217_ and L_223_ then L_116_:FireServer(L_218_) end if L_217_ then local L_229_, L_230_ = CheckForHumanoid(L_217_) if L_229_ then L_111_:FireServer(L_230_) if L_24_.AntiTK then if game.Players:FindFirstChild(L_230_.Parent.Name) and game.Players:FindFirstChild(L_230_.Parent.Name).TeamColor ~= L_2_.TeamColor or L_230_.Parent:FindFirstChild('Vars') and game.Players:FindFirstChild(L_230_.Parent:WaitForChild('Vars'):WaitForChild('BotID').Value) and L_2_.TeamColor ~= L_230_.Parent:WaitForChild('Vars'):WaitForChild('teamColor').Value then if L_217_.Name == 'Head' then L_110_:FireServer(L_230_, L_24_.HeadDamage) local L_231_ = L_19_:WaitForChild('BodyHit'):clone() L_231_.Parent = L_2_.PlayerGui L_231_:Play() game:GetService("Debris"):addItem(L_231_, L_231_.TimeLength) end if L_217_.Name ~= 'Head' and not (L_217_.Parent:IsA('Accessory') or L_217_.Parent:IsA('Hat')) then if L_217_.Name ~= 'Torso' and L_217_.Name ~= 'HumanoidRootPart' and L_217_.Name ~= 'Armor' then L_110_:FireServer(L_230_, L_24_.LimbDamage) elseif L_217_.Name == 'Torso' or L_217_.Name == 'HumanoidRootPart' and L_217_.Name ~= 'Armor' then L_110_:FireServer(L_230_, L_24_.BaseDamage) elseif L_217_.Name == 'Armor' then L_110_:FireServer(L_230_, L_24_.ArmorDamage) end local L_232_ = L_19_:WaitForChild('BodyHit'):clone() L_232_.Parent = L_2_.PlayerGui L_232_:Play() game:GetService("Debris"):addItem(L_232_, L_232_.TimeLength) end if (L_217_.Parent:IsA('Accessory') or L_217_.Parent:IsA('Hat')) then L_110_:FireServer(L_230_, L_24_.HeadDamage) local L_233_ = L_19_:WaitForChild('BodyHit'):clone() L_233_.Parent = L_2_.PlayerGui L_233_:Play() game:GetService("Debris"):addItem(L_233_, L_233_.TimeLength) end end else if L_217_.Name == 'Head' then L_110_:FireServer(L_230_, L_24_.HeadDamage) local L_234_ = L_19_:WaitForChild('BodyHit'):clone() L_234_.Parent = L_2_.PlayerGui L_234_:Play() game:GetService("Debris"):addItem(L_234_, L_234_.TimeLength) end if L_217_.Name ~= 'Head' and not (L_217_.Parent:IsA('Accessory') or L_217_.Parent:IsA('Hat')) then if L_217_.Name ~= 'Torso' and L_217_.Name ~= 'HumanoidRootPart' and L_217_.Name ~= 'Armor' then L_110_:FireServer(L_230_, L_24_.LimbDamage) elseif L_217_.Name == 'Torso' or L_217_.Name == 'HumanoidRootPart' and L_217_.Name ~= 'Armor' then L_110_:FireServer(L_230_, L_24_.BaseDamage) elseif L_217_.Name == 'Armor' then L_110_:FireServer(L_230_, L_24_.ArmorDamage) end local L_235_ = L_19_:WaitForChild('BodyHit'):clone() L_235_.Parent = L_2_.PlayerGui L_235_:Play() game:GetService("Debris"):addItem(L_235_, L_235_.TimeLength) end if (L_217_.Parent:IsA('Accessory') or L_217_.Parent:IsA('Hat')) then L_110_:FireServer(L_230_, L_24_.HeadDamage) local L_236_ = L_19_:WaitForChild('BodyHit'):clone() L_236_.Parent = L_2_.PlayerGui L_236_:Play() game:GetService("Debris"):addItem(L_236_, L_236_.TimeLength) end end end end if L_217_ and L_217_.Parent:FindFirstChild("Humanoid") then return L_217_, L_218_; end L_220_ = L_221_; end end function fireSemi() if L_15_ then L_69_ = false Recoiling = true Shooting = true --CheckReverb() if L_54_ then L_54_:FireServer(L_59_:WaitForChild('Fire').SoundId, L_59_) else L_59_:WaitForChild('Fire'):Play() end L_109_:FireServer() L_102_ = CreateBullet(L_24_.BulletSpread) L_103_ = L_103_ - 1 UpdateAmmo() RecoilFront = true local L_237_, L_238_ = spawn(function() CastRay(L_102_) end) if L_24_.CanBolt == true then BoltingBackAnim() delay(L_24_.Firerate / 2, function() if L_24_.CanSlideLock == false then BoltingForwardAnim() elseif L_24_.CanSlideLock == true then if L_103_ > 0 then BoltingForwardAnim() end end end) end delay(L_24_.Firerate / 2, function() Recoiling = false RecoilFront = false end) wait(L_24_.Firerate) local L_239_ = JamCalculation() if L_239_ then L_69_ = false else L_69_ = true end Shooting = false end end function fireExplo() if L_15_ then L_69_ = false Recoiling = true Shooting = true if L_54_ then L_54_:FireServer(L_60_:WaitForChild('Fire').SoundId, L_60_) else L_60_:WaitForChild('Fire'):Play() end L_109_:FireServer() L_102_ = CreateBullet(L_24_.BulletSpread) L_105_ = L_105_ - 1 UpdateAmmo() RecoilFront = true local L_240_, L_241_ = spawn(function() CastRay(L_102_) end) delay(L_24_.Firerate / 2, function() Recoiling = false RecoilFront = false end) L_69_ = false Shooting = false end end function fireShot() if L_15_ then L_69_ = false Recoiling = true Shooting = true RecoilFront = true --CheckReverb() if L_54_ then L_54_:FireServer(L_59_:WaitForChild('Fire').SoundId, L_59_) else L_59_:WaitForChild('Fire'):Play() end L_109_:FireServer() for L_243_forvar1 = 1, L_24_.ShotNum do spawn(function() L_102_ = CreateBullet(L_24_.BulletSpread) end) local L_244_, L_245_ = spawn(function() CastRay(L_102_) end) end for L_246_forvar1, L_247_forvar2 in pairs(L_59_:GetChildren()) do if L_247_forvar2.Name:sub(1, 7) == "FlashFX" then L_247_forvar2.Enabled = true end end delay(1 / 30, function() for L_248_forvar1, L_249_forvar2 in pairs(L_59_:GetChildren()) do if L_249_forvar2.Name:sub(1, 7) == "FlashFX" then L_249_forvar2.Enabled = false end end end) if L_24_.CanBolt == true then BoltingBackAnim() delay(L_24_.Firerate / 2, function() if L_24_.CanSlideLock == false then BoltingForwardAnim() elseif L_24_.CanSlideLock == true then if L_103_ > 0 then BoltingForwardAnim() end end end) end delay(L_24_.Firerate / 2, function() Recoiling = false RecoilFront = false end) L_103_ = L_103_ - 1 UpdateAmmo() wait(L_24_.Firerate) L_76_ = true IdleAnim() L_76_ = false local L_242_ = JamCalculation() if L_242_ then L_69_ = false else L_69_ = true end Shooting = false end end function fireBoltAction() if L_15_ then L_69_ = false Recoiling = true Shooting = true --CheckReverb() if L_54_ then L_54_:FireServer(L_59_:WaitForChild('Fire').SoundId, L_59_) else L_59_:WaitForChild('Fire'):Play() end L_109_:FireServer() L_102_ = CreateBullet(L_24_.BulletSpread) L_103_ = L_103_ - 1 UpdateAmmo() RecoilFront = true local L_250_, L_251_ = spawn(function() CastRay(L_102_) end) for L_253_forvar1, L_254_forvar2 in pairs(L_59_:GetChildren()) do if L_254_forvar2.Name:sub(1, 7) == "FlashFX" then L_254_forvar2.Enabled = true end end delay(1 / 30, function() for L_255_forvar1, L_256_forvar2 in pairs(L_59_:GetChildren()) do if L_256_forvar2.Name:sub(1, 7) == "FlashFX" then L_256_forvar2.Enabled = false end end end) if L_24_.CanBolt == true then BoltingBackAnim() delay(L_24_.Firerate / 2, function() if L_24_.CanSlideLock == false then BoltingForwardAnim() elseif L_24_.CanSlideLock == true then if L_103_ > 0 then BoltingForwardAnim() end end end) end delay(L_24_.Firerate / 2, function() Recoiling = false RecoilFront = false end) wait(L_24_.Firerate) L_76_ = true BoltBackAnim() BoltForwardAnim() IdleAnim() L_76_ = false local L_252_ = JamCalculation() if L_252_ then L_69_ = false else L_69_ = true end Shooting = false end end function fireAuto() while not Shooting and L_103_ > 0 and L_68_ and L_69_ and L_15_ do L_69_ = false Recoiling = true --CheckReverb() if L_54_ then L_54_:FireServer(L_59_:WaitForChild('Fire').SoundId, L_59_) else L_59_:WaitForChild('Fire'):Play() end L_109_:FireServer() L_103_ = L_103_ - 1 UpdateAmmo() Shooting = true RecoilFront = true L_102_ = CreateBullet(L_24_.BulletSpread) local L_257_, L_258_ = spawn(function() CastRay(L_102_) end) for L_260_forvar1, L_261_forvar2 in pairs(L_59_:GetChildren()) do if L_261_forvar2.Name:sub(1, 7) == "FlashFX" then L_261_forvar2.Enabled = true end end delay(1 / 30, function() for L_262_forvar1, L_263_forvar2 in pairs(L_59_:GetChildren()) do if L_263_forvar2.Name:sub(1, 7) == "FlashFX" then L_263_forvar2.Enabled = false end end end) if L_24_.CanBolt == true then BoltingBackAnim() delay(L_24_.Firerate / 2, function() if L_24_.CanSlideLock == false then BoltingForwardAnim() elseif L_24_.CanSlideLock == true then if L_103_ > 0 then BoltingForwardAnim() end end end) end delay(L_24_.Firerate / 2, function() Recoiling = false RecoilFront = false end) wait(L_24_.Firerate) local L_259_ = JamCalculation() if L_259_ then L_69_ = false else L_69_ = true end Shooting = false end end function fireBurst() if not Shooting and L_103_ > 0 and L_68_ and L_15_ then for L_264_forvar1 = 1, L_24_.BurstNum do if L_103_ > 0 and L_68_ then L_69_ = false Recoiling = true --CheckReverb() if L_54_ then L_54_:FireServer(L_59_:WaitForChild('Fire').SoundId, L_59_) else L_59_:WaitForChild('Fire'):Play() end L_109_:FireServer() L_102_ = CreateBullet(L_24_.BulletSpread) local L_265_, L_266_ = spawn(function() CastRay(L_102_) end) for L_268_forvar1, L_269_forvar2 in pairs(L_59_:GetChildren()) do if L_269_forvar2.Name:sub(1, 7) == "FlashFX" then L_269_forvar2.Enabled = true end end delay(1 / 30, function() for L_270_forvar1, L_271_forvar2 in pairs(L_59_:GetChildren()) do if L_271_forvar2.Name:sub(1, 7) == "FlashFX" then L_271_forvar2.Enabled = false end end end) if L_24_.CanBolt == true then BoltingBackAnim() delay(L_24_.Firerate / 2, function() if L_24_.CanSlideLock == false then BoltingForwardAnim() elseif L_24_.CanSlideLock == true then if L_103_ > 0 then BoltingForwardAnim() end end end) end L_103_ = L_103_ - 1 UpdateAmmo() RecoilFront = true delay(L_24_.Firerate / 2, function() Recoiling = false RecoilFront = false end) wait(L_24_.Firerate) local L_267_ = JamCalculation() if L_267_ then L_69_ = false else L_69_ = true end end Shooting = true end Shooting = false end end function Shoot() if L_15_ and L_69_ then if L_92_ == 1 then fireSemi() elseif L_92_ == 2 then fireAuto() elseif L_92_ == 3 then fireBurst() elseif L_92_ == 4 then fireBoltAction() elseif L_92_ == 5 then fireShot() elseif L_92_ == 6 then fireExplo() end end end
-- there's plenty of room for more
return module
--Set up event for when the server is shutting down.
StartShutdown.OnClientEvent:Connect(function() --Create the Gui and have it semi-transparent for 1 second. local Gui,Background = CreateTeleportScreen() Background.BackgroundTransparency = 0.5 Gui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui") wait(1) --Tween the transparency to 0. local Start = tick() local Time = 0.5 while tick() - Start < Time do local Dif = tick() - Start local Ratio = Dif/Time Background.BackgroundTransparency = 0.5 * (1 - Ratio) RenderStepped:Wait() end Background.BackgroundTransparency = 0 end)
--[=[ Constructs a new Signal that wraps around an RBXScriptSignal. @param rbxScriptSignal RBXScriptSignal -- Existing RBXScriptSignal to wrap @return Signal For example: ```lua local signal = Signal.Wrap(workspace.ChildAdded) signal:Connect(function(part) print(part.Name .. " added") end) Instance.new("Part").Parent = workspace ``` ]=]
function Signal.Wrap<T...>(rbxScriptSignal: RBXScriptSignal): Signal<T...> assert( typeof(rbxScriptSignal) == "RBXScriptSignal", "Argument #1 to Signal.Wrap must be a RBXScriptSignal; got " .. typeof(rbxScriptSignal) ) local signal = Signal.new() signal._proxyHandler = rbxScriptSignal:Connect(function(...) signal:Fire(...) end) return signal 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 = 50 local structureDamage = 100 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
--Positions
local xpos = script.Parent.Position.X local ypos = script.Parent.Position.Y local zpos = script.Parent.Position.Z local size = Vector3.new(xsize, ysize, zsize) local newsize = Vector3.new(xsize + 0.1, ysize + 0.1, zsize + 0.1) while true do script.Parent.Size = newsize script.Parent.Position = Vector3.new(xpos,ypos + 0.05,zpos) wait(0.2) script.Parent.Size = size script.Parent.Position = Vector3.new(xpos,ypos,zpos) wait(0.2) end
--[=[ @param instance Instance @return RBXScriptConnection Attaches the Janitor to a Roblox instance. Once this instance is removed from the game (parent or ancestor's parent set to `nil`), the Janitor will automatically clean up. :::caution Will throw an error if `instance` is not a descendant of the game hierarchy. ::: ]=]
function Janitor:AttachToInstance(instance: Instance) assert(instance:IsDescendantOf(game), "Instance is not a descendant of the game hierarchy") return self:Connect(instance.AncestryChanged, function(_child, parent) if not parent then self:Destroy() end end) end
-- if rot>-math.pi/8 then -- rot=rot-math.pi/20 -- end
spd.velocity=chg+(engine.CFrame.lookVector-Vector3.new(0.5,0,0))*inc --gyro.cframe=mouse.Hit --gyro.cframe=gyro.cframe*CFrame.Angles(0,-math.pi/5,rot) else rot=0 end end
--[[ ClassicCamera - Classic Roblox camera control module 2018 Camera Update - AllYourBlox Note: This module also handles camera control types Follow and Track, the latter of which is currently not distinguished from Classic --]]
--Scripted by DermonDarble
local userInputService = game:GetService("UserInputService") local player = game.Players.LocalPlayer local character = player.Character local humanoid = character.Humanoid local horse = script:WaitForChild("Horse").Value local horseGui = script:WaitForChild("HorseGui") horseGui.Parent = player.PlayerGui humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping, false) local rideAnimation = humanoid:LoadAnimation(horse.Animations.Ride) rideAnimation:Play() local movement = Vector3.new(0, 0, 0) userInputService.InputBegan:connect(function(inputObject, gameProcessedEvent) if not gameProcessedEvent then if inputObject.KeyCode == Enum.KeyCode.W or inputObject.KeyCode == Enum.KeyCode.Up then movement = Vector3.new(movement.X, movement.Y, -1) elseif inputObject.KeyCode == Enum.KeyCode.S or inputObject.KeyCode == Enum.KeyCode.Down then movement = Vector3.new(movement.X, movement.Y, 1) elseif inputObject.KeyCode == Enum.KeyCode.A or inputObject.KeyCode == Enum.KeyCode.Left then movement = Vector3.new(-1, movement.Y, movement.Z) elseif inputObject.KeyCode == Enum.KeyCode.D or inputObject.KeyCode == Enum.KeyCode.Right then movement = Vector3.new(1, movement.Y, movement.Z) elseif inputObject.KeyCode == Enum.KeyCode.Space then local ray = Ray.new(horse.HumanoidRootPart.Position + Vector3.new(0, -4.3, 0), Vector3.new(0, -1, 0)) local hit, position = game.Workspace:FindPartOnRay(ray, horse) if hit and hit.CanCollide then horse.Humanoid:ChangeState(Enum.HumanoidStateType.Jumping) end elseif inputObject.KeyCode == Enum.KeyCode.LeftShift then humanoid:ChangeState(Enum.HumanoidStateType.Jumping) end end end) userInputService.InputEnded:connect(function(inputObject, gameProcessedEvent) if not gameProcessedEvent then if inputObject.KeyCode == Enum.KeyCode.W or inputObject.KeyCode == Enum.KeyCode.Up then if movement.Z < 0 then movement = Vector3.new(movement.X, movement.Y, 0) end elseif inputObject.KeyCode == Enum.KeyCode.S or inputObject.KeyCode == Enum.KeyCode.Down then if movement.Z > 0 then movement = Vector3.new(movement.X, movement.Y, 0) end elseif inputObject.KeyCode == Enum.KeyCode.A or inputObject.KeyCode == Enum.KeyCode.Left then if movement.X < 0 then movement = Vector3.new(0, movement.Y, movement.Z) end elseif inputObject.KeyCode == Enum.KeyCode.D or inputObject.KeyCode == Enum.KeyCode.Right then if movement.X > 0 then movement = Vector3.new(0, movement.Y, movement.Z) end end end end) spawn(function() while horse.Seat.Occupant == humanoid do game:GetService("RunService").RenderStepped:wait() horse.Humanoid:Move(movement, true) end horseGui:Destroy() humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping, true) horse.Humanoid:Move(Vector3.new()) rideAnimation:Stop() script:Destroy() end)
-- setup emote chat hook (not nessessary) --[[game.Players.LocalPlayer.Chatted:connect(function(msg) local emote = "" if msg == "/e dance" then emote = dances[math.random(1, #dances)] elseif (string.sub(msg, 1, 3) == "/e ") then emote = string.sub(msg, 4) elseif (string.sub(msg, 1, 7) == "/emote ") then emote = string.sub(msg, 8) end if (pose == "Standing" and emoteNames[emote] ~= nil) then playAnimation(emote, 0.1, Humanoid) end end)]]
--
---------------------------------------------------
Displays = 3 -- Sets how many displays this scripts will use... DisplayColor = Color3.fromRGB(33, 84, 185) UColor = Color3.fromRGB(33, 84, 185) DColor = Color3.fromRGB(33, 84, 185) ArrowDelay = 0.05
--Rescripted by Luckymaxer
Tool = script.Parent Handle = Tool:WaitForChild("Handle") Players = game:GetService("Players") Debris = game:GetService("Debris") Speed = 250 Duration = 1 NozzleOffset = Vector3.new(0, 0.4, -1.1) Sounds = { Fire = Handle:WaitForChild("Fire"), Reload = Handle:WaitForChild("Reload"), HitFade = Handle:WaitForChild("HitFade") } PointLight = Handle:WaitForChild("PointLight") ServerControl = (Tool:FindFirstChild("ServerControl") or Instance.new("RemoteFunction")) ServerControl.Name = "ServerControl" ServerControl.Parent = Tool ClientControl = (Tool:FindFirstChild("ClientControl") or Instance.new("RemoteFunction")) ClientControl.Name = "ClientControl" ClientControl.Parent = Tool ServerControl.OnServerInvoke = (function(player, Mode, Value, arg) if player ~= Player or Humanoid.Health == 0 or not Tool.Enabled then return end if Mode == "Click" and Value then Activated(arg) end end) function InvokeClient(Mode, Value) pcall(function() ClientControl:InvokeClient(Player, Mode, Value) end) end function TagHumanoid(humanoid, player) local Creator_Tag = Instance.new("ObjectValue") Creator_Tag.Name = "creator" Creator_Tag.Value = player Debris:AddItem(Creator_Tag, 2) Creator_Tag.Parent = humanoid end function UntagHumanoid(humanoid) for i, v in pairs(humanoid:GetChildren()) do if v:IsA("ObjectValue") and v.Name == "creator" then v:Destroy() end end end function FindCharacterAncestor(Parent) if Parent and Parent ~= game:GetService("Workspace") then local humanoid = Parent:FindFirstChild("Humanoid") if humanoid then return Parent, humanoid else return FindCharacterAncestor(Parent.Parent) end end return nil end function GetTransparentsRecursive(Parent, PartsTable) local PartsTable = (PartsTable or {}) for i, v in pairs(Parent:GetChildren()) do local TransparencyExists = false pcall(function() local Transparency = v["Transparency"] if Transparency then TransparencyExists = true end end) if TransparencyExists then table.insert(PartsTable, v) end GetTransparentsRecursive(v, PartsTable) end return PartsTable end function SelectionBoxify(Object) local SelectionBox = Instance.new("SelectionBox") SelectionBox.Adornee = Object SelectionBox.Color = BrickColor.new("Toothpaste") SelectionBox.Parent = Object return SelectionBox end local function Light(Object) local Light = PointLight:Clone() Light.Range = (Light.Range + 2) Light.Parent = Object end function FadeOutObjects(Objects, FadeIncrement) repeat local LastObject = nil for i, v in pairs(Objects) do v.Transparency = (v.Transparency + FadeIncrement) LastObject = v end wait() until LastObject.Transparency >= 1 or not LastObject end function Dematerialize(character, humanoid, FirstPart) if not character or not humanoid then return end humanoid.WalkSpeed = 0 local Parts = {} for i, v in pairs(character:GetChildren()) do if v:IsA("BasePart") then v.Anchored = true table.insert(Parts, v) elseif v:IsA("LocalScript") or v:IsA("Script") then v:Destroy() end end local SelectionBoxes = {} local FirstSelectionBox = SelectionBoxify(FirstPart) Light(FirstPart) wait(0.05) for i, v in pairs(Parts) do if v ~= FirstPart then table.insert(SelectionBoxes, SelectionBoxify(v)) Light(v) end end local ObjectsWithTransparency = GetTransparentsRecursive(character) FadeOutObjects(ObjectsWithTransparency, 0.1) wait(0.5) character:BreakJoints() humanoid.Health = 0 Debris:AddItem(character, 2) local FadeIncrement = 0.05 Delay(0.2, function() FadeOutObjects({FirstSelectionBox}, FadeIncrement) if character and character.Parent then character:Destroy() end end) FadeOutObjects(SelectionBoxes, FadeIncrement) end function Touched(Projectile, Hit) if not Hit or not Hit.Parent then return end local character, humanoid = FindCharacterAncestor(Hit) if character and humanoid and character ~= Character then local ForceFieldExists = false for i, v in pairs(character:GetChildren()) do if v:IsA("ForceField") then ForceFieldExists = true end end if not ForceFieldExists then if Projectile then local HitFadeSound = Projectile:FindFirstChild(Sounds.HitFade.Name) local torso = humanoid.Torso if HitFadeSound and torso then HitFadeSound.Parent = torso HitFadeSound:Play() end end Dematerialize(character, humanoid, Hit) end if Projectile and Projectile.Parent then Projectile:Destroy() end end end function Equipped() Character = Tool.Parent Player = Players:GetPlayerFromCharacter(Character) Humanoid = Character:FindFirstChild("Humanoid") if not Player or not Humanoid or Humanoid.Health == 0 then return end end function Activated(target) if Tool.Enabled and Humanoid.Health > 0 then Tool.Enabled = false InvokeClient("PlaySound", Sounds.Fire) local HandleCFrame = Handle.CFrame local FiringPoint = HandleCFrame.p + HandleCFrame:vectorToWorldSpace(NozzleOffset) local ShotCFrame = CFrame.new(FiringPoint, target) local LaserShotClone = BaseShot:Clone() LaserShotClone.CFrame = ShotCFrame + (ShotCFrame.lookVector * (BaseShot.Size.Z / 2)) local BodyVelocity = Instance.new("BodyVelocity") BodyVelocity.velocity = ShotCFrame.lookVector * Speed BodyVelocity.Parent = LaserShotClone LaserShotClone.Touched:connect(function(Hit) if not Hit or not Hit.Parent then return end Touched(LaserShotClone, Hit) end) Debris:AddItem(LaserShotClone, Duration) LaserShotClone.Parent = game:GetService("Workspace") wait(0.6) -- FireSound length InvokeClient("PlaySound", Sounds.Reload) wait(0.75) -- ReloadSound length Tool.Enabled = true end end function Unequipped() end BaseShot = Instance.new("Part") BaseShot.Name = "Effect" BaseShot.BrickColor = BrickColor.new("Toothpaste") BaseShot.Material = Enum.Material.Plastic BaseShot.Shape = Enum.PartType.Block BaseShot.TopSurface = Enum.SurfaceType.Smooth BaseShot.BottomSurface = Enum.SurfaceType.Smooth BaseShot.FormFactor = Enum.FormFactor.Custom BaseShot.Size = Vector3.new(0.2, 0.2, 3) BaseShot.CanCollide = false BaseShot.Locked = true SelectionBoxify(BaseShot) Light(BaseShot) BaseShotSound = Sounds.HitFade:Clone() BaseShotSound.Parent = BaseShot Tool.Equipped:connect(Equipped) Tool.Unequipped:connect(Unequipped)
----------------- --| Functions |-- -----------------
local function OnActivated() local myModel = MyPlayer.Character if Tool.Enabled and myModel and myModel:FindFirstChildOfClass("Humanoid") and myModel.Humanoid.Health > 0 then Tool.Enabled = false script.Parent.Handle.FireSound:Play() local Pos = MouseLoc:InvokeClient(MyPlayer) -- Create a clone of Rocket and set its color local rocketClone = Rocket:Clone() DebrisService:AddItem(rocketClone, 30) rocketClone.BrickColor = MyPlayer.TeamColor -- Position the rocket clone and launch! local spawnPosition = (ToolHandle.CFrame * CFrame.new(5, 0, 0)).p rocketClone.CFrame = CFrame.new(spawnPosition, Pos) --NOTE: This must be done before assigning Parent rocketClone.Velocity = rocketClone.CFrame.lookVector * ROCKET_SPEED --NOTE: This should be done before assigning Parent rocketClone.Parent = workspace rocketClone:SetNetworkOwner(nil) wait(RELOAD_TIME) Tool.Enabled = true script.Parent.Handle.Ready:Play() end end function OnEquipped() MyPlayer = PlayersService:GetPlayerFromCharacter(Tool.Parent) end
--[[ Settings Changed Connections ]]
-- LocalPlayer.Changed:connect(function(property) if lastInputType == Enum.UserInputType.Touch and property == 'DevTouchMovementMode' then ControlState:SwitchTo(ControlModules.Touch) elseif UserInputService.KeyboardEnabled and property == 'DevComputerMovementMode' then ControlState:SwitchTo(ControlModules.Keyboard) end end) GameSettings.Changed:connect(function(property) if not IsUserChoice then return end if property == 'TouchMovementMode' or property == 'ComputerMovementMode' then UserMovementMode = GameSettings[property] if property == 'ComputerMovementMode' then ControlState:SwitchTo(ControlModules.Keyboard) end end end)
--vehicle.Nose.Touched:connect(function (hitPart) onTouch(hitPart, Vector3.new(0, 0, -1)) end) --vehicle.Bumper_Front.Touched:connect(function (hitPart) onTouch(hitPart, Vector3.new(0, 0, -1)) end) --vehicle.Bumper_Back.Touched:connect(function (hitPart) onTouch(hitPart, Vector3.new(0, 0, 1)) end) --vehicle.Tailgate.Touched:connect(function (hitPart) onTouch(hitPart, Vector3.new(0, 0, 1)) end) --vehicle.ExhaustPipe.Touched:connect(function (hitPart) onTouch(hitPart, Vector3.new(0, 0, 1)) end)
frontForceField.Touched:connect(function (hitPart) onTouch(hitPart, Vector3.new(0, -1, 0)) end) backForceField.Touched:connect(function (hitPart) onTouch(hitPart, Vector3.new(0, 1, 0)) end) vehicle.Wheel_BackLeft.Touched:connect(function (hitPart) onTouch(hitPart, Vector3.new(0, 0, -1)) end) vehicle.Wheel_FrontLeft.Touched:connect(function (hitPart) onTouch(hitPart, Vector3.new(0, 0, -1)) end) vehicle.Wheel_BackRight.Touched:connect(function (hitPart) onTouch(hitPart, Vector3.new(0, 0, 1)) end) vehicle.Wheel_FrontRight.Touched:connect(function (hitPart) onTouch(hitPart, Vector3.new(0, 0, 1)) end) local vehicleDamaged = false function checkIfVehicleIsDamaged() if (not frontForceField.Parent or not backForceField.Parent) and not vehicleDamaged and allowDamage then vehicleDamaged = true script.IsDamaged.Value = true vehicle.VehicleScript.Disabled = true vehicleSmoke.Enabled = true vehicle.VehicleSeat.MaxSpeed = 0 vehicle.ExhaustPipe.Smoke.Enabled = false -- Break Joints vehicle.Wheel_BackLeft:BreakJoints() vehicle.Wheel_FrontLeft:BreakJoints() vehicle.Wheel_BackRight:BreakJoints() vehicle.Wheel_FrontRight:BreakJoints() hood:BreakJoints() end end vehicle.ChildRemoved:connect(checkIfVehicleIsDamaged)
---------------------------------------------------------------------------------------------------- --------------------=[ RCM Settings ]=----------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------
-- Command Settings --- List of user IDs able to use regen and clear commands ,HostList = { --- Game owners automatically have perms, commands always work in studio 57158149, } ,HostRank = 255 --- If the game is group owned, anyone above this rank number will automatically have command perms ,CommandPrefix = "/" -- Command List -- /ClearGuns Removes dropped guns from workspace -- /ResetGlass Replaces broken glass and removes shards -- /ResetLights Fixes broken lights -- /ResetAll Fixes both lights and glass -- /ACSlog View kill log -- Keybinds ,LeanLeft = Enum.KeyCode.Q ,LeanRight = Enum.KeyCode.E ,Crouch = Enum.KeyCode.C ,StandUp = Enum.KeyCode.X ,Sprint = Enum.KeyCode.LeftShift ,SlowWalk = Enum.KeyCode.Z ,Reload = Enum.KeyCode.R ,FireMode = Enum.KeyCode.V ,CheckMag = Enum.KeyCode.M ,ZeroUp = Enum.KeyCode.RightBracket ,ZeroDown = Enum.KeyCode.LeftBracket ,DropGun = Enum.KeyCode.Backspace ,SwitchSights = Enum.KeyCode.T ,ToggleLight = Enum.KeyCode.J ,ToggleLaser = Enum.KeyCode.H ,ToggleBipod = Enum.KeyCode.B ,Interact = Enum.KeyCode.G ,ToggleNVG = Enum.KeyCode.N -- Effects Settings ,BreakLights = true --- Can break any part named "Light" with a light inside of it ,BreakGlass = true --- Can shatter glass with bullets ,GlassName = "Glass" --- Name of parts that can shatter ,ShardDespawn = 60 --- How long glass stays before being removed ,ShellLimit = 100 --- Max number of ejected shells that can be on the ground ,ShellDespawn = 0 --- Shells will be deleted after being on the ground for this amount of time, 0 = No despawn -- Weapon Drop Settings ,WeaponDropping = true --- Enable weapon dropping with backspace? ,WeaponCollisions = true --- Allow weapons to collide with each other ,SpawnStacking = false --- Enabling this allows multiple guns to be spawned by one spawner, causing them to 'stack' ,MaxDroppedWeapons = 10 --- Max number of weapons that can be dropped at once ,PickupDistance = 7 --- Max distance from which a player can pickup guns ,DropWeaponsOnDeath = false --- Drop all guns on death ,DropWeaponsOnLeave = false --- Drop all guns when the player leaves the game ,TimeDespawn = true --- Enable a timer for weapon deletion ,WeaponDespawnTime = 30 --- If TimeDespawn is enabled, dropped guns are deleted after this time -- Misc Settings ,AmmoBoxDespawn = 300 --- Max time ammo boxes will be on the ground ,EquipInVehicleSeat = true --- Allow players to use weapons while operating a vehicle ,EquipInSeat = true --- Allow players to use weapons in regular seats ,DisableInSeat = true --- Prevents movement keybinds from messing with vehicle scripts like blizzard ,WeaponWeight = true --- Enables the WeaponWeight setting in guns, slowing down the player while a gun is equipped ,HeadMovement = true --- Toggles head movement } return ServerConfig
--Made by Luckymaxer
Character = script.Parent Humanoid = Character:FindFirstChild("Humanoid") Debris = game:GetService("Debris") WindDirection = script:FindFirstChild("WindDirection") Force = script:FindFirstChild("Force") Parts = {} BaseColor = BrickColor.new("Really red") Color = BaseColor.Color Gravity = 196.20 Duration = 3 Classes = { BasePart = { BrickColor = BaseColor, Material = Enum.Material.Plastic, Reflectance = 0, Transparency = 0.75, }, FileMesh = { TextureId = "", }, DataModelMesh = { VertexColor = Vector3.new(Color.r, Color.g, Color.b), }, CharacterMesh = { BaseTextureId = 0, OverlayTextureId = 0, }, Shirt = { ShirtTemplate = "", }, Pants = { PantsTemplate = "", }, FaceInstance = { Texture = "", }, Sparkles = { SparkleColor = Color, Enabled = false, }, Fire = { Color = Color, SecondaryColor = Color, Enabled = false, }, Smoke = { Color = Color, Enabled = false, }, Light = { Color = Color, Enabled = false, }, ParticleEmitter = { Color = ColorSequence.new(Color, Color), Enabled = false, } } Fire = script:FindFirstChild("Fire") Objects = {} RemovedObjects = {} FakeParts = {} Hats = {} Tools = {} Particles = {} function DestroyScript() Debris:AddItem(script, 0.5) end function TweenNumber(Start, Goal, Time) return ((Goal - Start) / Time) end function Decorate(Object) local ObjectData = { Object = nil, Properties = {}, } for i, v in pairs(Classes) do if Object:IsA(i) then if Object:IsA("CharacterMesh") then local Mesh = Instance.new("SpecialMesh") Mesh.MeshType = Enum.MeshType.FileMesh Mesh.MeshId = ("http://www.roblox.com/asset/?id=" .. Object.MeshId) for ii, vv in pairs(Character:GetChildren()) do if vv:IsA("BasePart") and Object.BodyPart.Name == string.gsub(vv.Name, " ", "") then Mesh.Parent = vv table.insert(RemovedObjects, {Object = Object, NewObject = Mesh, Parent = Object.Parent}) Object.Parent = nil end end elseif Object:IsA("BasePart") and Object.Transparency >= 1 then else ObjectData.Object = Object for ii, vv in pairs(v) do local PropertyValue = nil local PropertyValueSet = false pcall(function() PropertyValue = Object[ii] PropertyValueSet = true Object[ii] = vv end) if PropertyValueSet then ObjectData.Properties[ii] = PropertyValue end end end end end table.insert(Objects, ObjectData) end function Redesign(Parent) for i, v in pairs(Parent:GetChildren()) do if v ~= script then Decorate(v) Redesign(v) end end end if not Humanoid or not WindDirection then DestroyScript() return end for i, v in pairs(Character:GetChildren()) do if v:IsA("Hat") or v:IsA("Tool") then local FakeObject = v:Clone() Decorate(FakeObject) table.insert(((v:IsA("Hat") and Hats) or Tools), v) for ii, vv in pairs(FakeObject:GetChildren()) do if vv:IsA("BasePart") then local FakePart = vv:Clone() FakePart.Name = v.Name table.insert(FakeParts, FakePart) FakePart.Parent = Character FakePart.CFrame = vv.CFrame end end end end Humanoid:UnequipTools() for i, v in pairs({Hats, Tools}) do for ii, vv in pairs(v) do vv.Parent = nil end end Redesign(Character) local GhostModel = Instance.new("Model") GhostModel.Name = "GhostModel" for i, v in pairs(Character:GetChildren()) do if v:IsA("BasePart") then if v.Name ~= "HumanoidRootPart" then local FakePart = v:Clone() FakePart.Name = "Part" FakePart.CanCollide = false for ii, vv in pairs(FakePart:GetChildren()) do if not vv:IsA("DataModelMesh") then vv:Destroy() end end table.insert(FakeParts, FakePart) local Mass = (v:GetMass() * Gravity ^ 2) local BodyVelocity = Instance.new("BodyVelocity") BodyVelocity.maxForce = Vector3.new(Mass, Mass, Mass) BodyVelocity.velocity = (WindDirection.Value * Force.Value) BodyVelocity.Parent = FakePart FakePart.Parent = GhostModel local FireParticle = Fire:Clone() FireParticle.Enabled = true table.insert(Particles, FireParticle) FireParticle.Parent = FakePart end v:Destroy() end end Spawn(function() local Start = Classes.BasePart.Transparency local End = 1 local Time = 0.75 local Rate = (1 / 30) local Frames = (Time / Rate) for i = 1, Frames do local Transparency = (Start + TweenNumber(Start, End, (Frames / (i + 1)))) for ii, vv in pairs(FakeParts) do if vv and vv.Parent then vv.Transparency = Transparency end end wait(Rate) end for i, v in pairs(Particles) do v.Enabled = false end end) Debris:AddItem(GhostModel, 5) GhostModel.Parent = game:GetService("Workspace")
--- FUNCTIONS ---
local isFreecam = false local MouseListening = false Freecam = function() UserInputService.MouseIconEnabled = not UserInputService.MouseIconEnabled if not isFreecam then isFreecam = not isFreecam Camera.CameraType = "Scriptable" -- When mouse button 1 is held down go move camera forward in direction its facing, go backwards with mouse button 2 MouseListening = true while MouseListening do task.wait() local MouseInstancePos = Mouse.Hit.Position -- Look at MouseInstancePos local Final = CFrame.new(Camera.CFrame.Position, MouseInstancePos) local DownButtons = UserInputService:GetMouseButtonsPressed() if #DownButtons ~= 0 then if DownButtons[1].UserInputType == Enum.UserInputType.MouseButton1 then Final *= CFrame.new(0, 0, -5) elseif DownButtons[1].UserInputType == Enum.UserInputType.MouseButton2 then Final *= CFrame.new(0, 0, 5) end end TweenService:Create(Camera, TweenInfo.new(0.25), {CFrame = Final}):Play() end else isFreecam = not isFreecam MouseListening = false Player.Character.HumanoidRootPart.CFrame = Camera.CFrame Camera.CameraType = "Custom" end end ShiftLockToggle = function() Locked = not Locked -- Fix HRP to the camera direction local HumanoidRootPart = Player.Character.HumanoidRootPart local previousAngle = 0 while Locked do task.wait() local cameraForward = Camera.CFrame.LookVector cameraForward = Vector3.new(cameraForward.x, 0, cameraForward.z).Unit local angle = math.atan2(-cameraForward.x, -cameraForward.z) HumanoidRootPart.CFrame = CFrame.new(HumanoidRootPart.Position) * CFrame.Angles(0, angle, 0) end end Run = function(Humanoid, KeyCode) Humanoid.WalkSpeed = 23.5 local RunAnimation = Humanoid:LoadAnimation(script.Run) RunAnimation:Play() if not isMobile then repeat task.wait() until not UserInputService:IsKeyDown(KeyCode) else UserInputService.InputEnded:Wait() end Humanoid.WalkSpeed = 16 RunAnimation:Stop() RunAnimation:Remove() end Input = function(Input, Typing) if Typing then return end repeat task.wait() until Player.Character local Character = Player.Character local Humanoid = Character:WaitForChild("Humanoid") local KeyCode = Input.KeyCode if table.find(DirectionalKeys, KeyCode) then if (tick() - LastDirectional < 0.2) and LastKeyDown == KeyCode then Run(Humanoid, KeyCode) end LastDirectional = tick() end LastKeyDown = KeyCode end
--// Special Variables
return function(Vargs, GetEnv) local env = GetEnv(nil, {script = script}) setfenv(1, env) local server = Vargs.Server local service = Vargs.Service local Functions, Admin, Anti, Core, HTTP, Logs, Remote, Process, Variables, Settings local function Init() Functions = server.Functions Admin = server.Admin Anti = server.Anti Core = server.Core HTTP = server.HTTP Logs = server.Logs Remote = server.Remote Process = server.Process Variables = server.Variables Settings = server.Settings Variables.BanMessage = Settings.BanMessage Variables.LockMessage = Settings.LockMessage for _, v in ipairs(Settings.MusicList or {}) do table.insert(Variables.MusicList, v) end for _, v in ipairs(Settings.InsertList or {}) do table.insert(Variables.InsertList, v) end for _, v in ipairs(Settings.CapeList or {}) do table.insert(Variables.Capes, v) end Variables.Init = nil Logs:AddLog("Script", "Variables Module Initialized") end local function AfterInit(data) server.Variables.CodeName = server.Functions:GetRandom() Variables.RunAfterInit = nil Logs:AddLog("Script", "Finished Variables AfterInit") end local Lighting = service.Lighting server.Variables = { Init = Init, RunAfterInit = AfterInit, ZaWarudo = false, CodeName = math.random(), IsStudio = service.RunService:IsStudio(), -- Used to check if Adonis is running inside Roblox Studio as things like TeleportService and DataStores (if API Access is disabled) do not work in Studio AuthorizedToReply = {}, FrozenObjects = {}, ScriptBuilder = {}, CachedDonors = {}, BanMessage = "Banned", LockMessage = "Not Whitelisted", DonorPass = {1348327, 1990427, 1911740, 167686, 98593, "6878510605", 5212082, 5212081}, --// Strings are items, numbers are gamepasses WebPanel_Initiated = false, LightingSettings = { Ambient = Lighting.Ambient, OutdoorAmbient = Lighting.OutdoorAmbient, Brightness = Lighting.Brightness, TimeOfDay = Lighting.TimeOfDay, FogColor = Lighting.FogColor, FogEnd = Lighting.FogEnd, FogStart = Lighting.FogStart, GlobalShadows = Lighting.GlobalShadows, Outlines = Lighting.Outlines, ShadowColor = Lighting.ShadowColor, ColorShift_Bottom = Lighting.ColorShift_Bottom, ColorShift_Top = Lighting.ColorShift_Top, GeographicLatitude = Lighting.GeographicLatitude, Name = Lighting.Name, }, OriginalLightingSettings = { Ambient = Lighting.Ambient, OutdoorAmbient = Lighting.OutdoorAmbient, Brightness = Lighting.Brightness, TimeOfDay = Lighting.TimeOfDay, FogColor = Lighting.FogColor, FogEnd = Lighting.FogEnd, FogStart = Lighting.FogStart, GlobalShadows = Lighting.GlobalShadows, Outlines = Lighting.Outlines, ShadowColor = Lighting.ShadowColor, ColorShift_Bottom = Lighting.ColorShift_Bottom, ColorShift_Top = Lighting.ColorShift_Top, GeographicLatitude = Lighting.GeographicLatitude, Name = Lighting.Name, Sky = Lighting:FindFirstChildOfClass("Sky") and Lighting:FindFirstChildOfClass("Sky"):Clone(), }, PMtickets = {}; HelpRequests = {}; Objects = {}; InsertedObjects = {}; CommandLoops = {}; SavedTools = {}; Waypoints = {}; Cameras = {}; Jails = {}; LocalEffects = {}; SizedCharacters = {}; BundleCache = {}; TrackingTable = {}; DisguiseBindings = {}; IncognitoPlayers = {}; MusicList = { {Name = "epic", ID = 27697743}, -- Zero Project - Gothic {Name = "halo", ID = 1034065}, -- Halo Theme {Name = "cursed", ID = 1372257}, -- Cursed Abbey {Name = "extreme", ID = 11420933}, -- TOPW {Name = "tacos", ID = 142376088}, -- Parry Gripp - Raining Tacos {Name = "awaken", ID = 27697277}, -- Positively Dark - Awakening {Name = "mario", ID = 1280470}, -- SM64 Theme {Name = "chrono", ID = 1280463}, -- Chrono Trigger Theme {Name = "dotr", ID = 11420922}, -- DOTR | ▼ --- ▼ I do not speak tags {Name = "entertain", ID = 27697267}, -- ##### ###### - Entertainer Rag {Name = "fantasy", ID = 1280473}, -- FFVII Battle AC {Name = "final", ID = 1280414}, -- Final Destination {Name = "emblem", ID = 1372259}, -- Fire Emblem {Name = "flight", ID = 27697719}, -- Daniel Bautista - Flight of the Bumblebee {Name = "gothic", ID = 27697743}, -- Zero Project - Gothic {Name = "hiphop", ID = 27697735}, -- Jeff Syndicate - Hip Hop {Name = "intro", ID = 27697707}, -- Daniel Bautista - Intro {Name = "mule", ID = 1077604}, -- M.U.L.E {Name = "film", ID = 27697713}, -- Daniel Bautista - Music for a Film {Name = "schala", ID = 5985787}, -- Schala {Name = "tunnel", ID = 9650822}, -- S4Tunnel {Name = "spanish", ID = 5982975}, -- TheBuzzer {Name = "venom", ID = 1372262}, -- Star Fox Theme {Name = "guitar", ID = 5986151}, -- 5986151 {Name = "hardstyle", ID = 1839246774}, -- Hardstyle {Name = "crabrave", ID = 5410086218}, -- Noisestorm - Crab Rave }; InsertList = {}; Capes = { {Name = "crossota", Material = "Neon", Color = "Cyan", ID = 420260457}, {Name = "jamiejr99", Material = "Neon", Color = "Cashmere", ID = 429297485}, {Name = "new yeller", Material = "Fabric", Color = "New Yeller"}, {Name = "pastel blue", Material = "Fabric", Color = "Pastel Blue"}, {Name = "dusty rose", Material = "Fabric", Color = "Dusty Rose"}, {Name = "cga brown", Material = "Fabric", Color = "CGA brown"}, {Name = "random", Material = "Fabric", Color = (BrickColor.random()).Name}, {Name = "shiny", Material = "Plastic", Color = "Institutional white", Reflectance = 1}, {Name = "gold", Material = "Plastic", Color = "Bright yellow", Reflectance = 0.4}, {Name = "kohl", Material = "Fabric", Color = "Really black", ID = 108597653}, {Name = "script", Material = "Plastic", Color = "White", ID = 151359194}, {Name = "batman", Material = "Fabric", Color = "Institutional white", ID = 108597669}, {Name = "epix", Material = "Plastic", Color = "Really black", ID = 149442745}, {Name = "superman", Material = "Fabric", Color = "Bright blue", ID = 108597677}, {Name = "swag", Material = "Fabric", Color = "Pink", ID = 109301474}, {Name = "donor", Material = "Plastic", Color = "White", ID = 149009184}, {Name = "gomodern", Material = "Plastic", Color = "Really black", ID = 149438175}, {Name = "admin", Material = "Plastic", Color = "White", ID = 149092195}, {Name = "giovannis", Material = "Plastic", Color = "White", ID = 149808729}, {Name = "godofdonuts", Material = "Plastic", Color = "Institutional white", ID = 151034443}, {Name = "host", Material = "Plastic", Color = "Really black", ID = 152299000}, {Name = "cohost", Material = "Plastic", Color = "Really black", ID = 152298950}, {Name = "trainer", Material = "Plastic", Color = "Really black", ID = 152298976}, {Name = "ba", Material = "Plastic", Color = "White", ID = 172528001} }; Blacklist = { Enabled = (server.Settings.BlacklistEnabled ~= nil and server.Settings.BlacklistEnabled) or true, Lists = { Settings = server.Settings.Blacklist }, }; Whitelist = { Enabled = server.Settings.WhitelistEnabled, Lists = { Settings = server.Settings.Whitelist }, }; } end
-- perform the update loop
if rigtype == "R15" then -- do the r15 update loop stepped_con = game:GetService("RunService").RenderStepped:Connect(function() -- checkfirstperson() checks if camera is first person and enables/disables the viewmodel accordingly checkfirstperson() -- update loop if isfirstperson == true then -- make arms visible visiblearms(true) -- update walk sway if we are walking if isrunning == true and includewalksway and humanoid:GetState() ~= Enum.HumanoidStateType.Freefall and humanoid:GetState() ~= Enum.HumanoidStateType.Landed then walksway = walksway:lerp( CFrame.new( (0.1*swaysize) * math.sin(tick() * (2 * humanoid.WalkSpeed/4)), (0.1*swaysize) * math.cos(tick() * (4 * humanoid.WalkSpeed/4)), 0 )* CFrame.Angles( 0, 0, (-.05*swaysize) * math.sin(tick() * (2 * humanoid.WalkSpeed/4)) ) ,0.1*sensitivity) else walksway = walksway:Lerp(CFrame.new(), 0.05*sensitivity) end -- local delta = uis:GetMouseDelta() if includecamerasway then sway = sway:Lerp(Vector3.new(delta.X,delta.Y,delta.X/2), 0.1*sensitivity) end -- if includestrafe then strafesway = strafesway:Lerp(CFrame.Angles(0,0,-rootpart.CFrame.rightVector:Dot(humanoid.MoveDirection)/(10/swaysize)), 0.1*sensitivity) end -- if includejumpsway then jumpsway = jumpswaygoal.Value end -- update animation transform for viewmodel rightshoulderclone.Transform = rightshoulder.Transform leftshoulderclone.Transform = leftshoulder.Transform if firstperson_waist_movements_enabled then waistclone.Transform = waist.Transform end -- cframe the viewmodel local finalcf = (camera.CFrame*walksway*jumpsway*strafesway*CFrame.Angles(math.rad(sway.Y*swaysize),math.rad(sway.X*swaysize)/10,math.rad(sway.Z*swaysize)/2))+(camera.CFrame.UpVector*(-1.7-(headoffset.Y+(aimoffset.Value.Y))))+(camera.CFrame.LookVector*(headoffset.Z+(aimoffset.Value.Z)))+(camera.CFrame.RightVector*(-headoffset.X-(aimoffset.Value.X)+(-(sway.X*swaysize)/75))) viewmodel:SetPrimaryPartCFrame(finalcf) end end) elseif rigtype == "R6" then -- do the R6 update loop stepped_con = game:GetService("RunService").RenderStepped:Connect(function() swaysize = script.WalkSwayMultiplier.Value -- checkfirstperson() checks if camera is first person and enables/disables the viewmodel accordingly checkfirstperson() -- update loop if isfirstperson == true then -- make arms visible visiblearms(true) -- update walk sway if we are walking if isrunning == true and includewalksway and humanoid:GetState() ~= Enum.HumanoidStateType.Freefall and humanoid:GetState() ~= Enum.HumanoidStateType.Landed then walksway = walksway:lerp( CFrame.new( (0.07*swaysize) * math.sin(tick() * (2 * humanoid.WalkSpeed/4)), (0.07*swaysize) * math.cos(tick() * (4 * humanoid.WalkSpeed/4)), 0 )* CFrame.Angles( 0, 0, (-.03*swaysize) * math.sin(tick() * (2 * humanoid.WalkSpeed/4)) ) ,0.2*sensitivity) else walksway = walksway:Lerp(CFrame.new(), 0.05*sensitivity) end -- local delta = uis:GetMouseDelta() -- if includecamerasway then sway = sway:Lerp(Vector3.new(delta.X,delta.Y,delta.X/2), 0.1*sensitivity) end -- if includestrafe then strafesway = strafesway:Lerp(CFrame.Angles(0,0,-rootpart.CFrame.rightVector:Dot(humanoid.MoveDirection)/(20/swaysize)), 0.1*sensitivity) end -- if includejumpsway == true then jumpsway = jumpswaygoal.Value end -- update animation transform for viewmodel rightshoulderclone.Transform = rightshoulder.Transform leftshoulderclone.Transform = leftshoulder.Transform -- cframe the viewmodel local finalcf = (camera.CFrame*walksway*jumpsway*strafesway*CFrame.Angles(math.rad(sway.Y*swaysize),math.rad(sway.X*swaysize)/10,math.rad(sway.Z*swaysize)/2))+(camera.CFrame.UpVector*(-1.7-(headoffset.Y+(aimoffset.Value.Y))))+(camera.CFrame.LookVector*(headoffset.Z+(aimoffset.Value.Z)))+(camera.CFrame.RightVector*(-headoffset.X-(aimoffset.Value.X)+(-(sway.X*swaysize)/75))) viewmodel:SetPrimaryPartCFrame(finalcf * script.CFrameAimOffset.Value:Inverse()) end end) end
--Made by Luckymaxer
Players = game:GetService("Players") Debris = game:GetService("Debris") RbxUtility = LoadLibrary("RbxUtility") Create = RbxUtility.Create Character = script.Parent Humanoid = Character:FindFirstChild("Humanoid") Player = Players:GetPlayerFromCharacter(Character) Fire = script:WaitForChild("Fire") Creator = script:FindFirstChild("Creator") Removing = false Flames = {} function DestroyScript() if Removing then return end Removing = true if Humanoid then Humanoid.WalkSpeed = 16 end for i, v in pairs(Flames) do v.Enabled = false Debris:AddItem(v, 2) end Debris:AddItem(script, 1) end function IsTeamMate(Player1, Player2) return (Player1 and Player2 and not Player1.Neutral and not Player2.Neutral and Player1.TeamColor == Player2.TeamColor) end function TagHumanoid(humanoid, player) local Creator_Tag = Create("ObjectValue"){ Name = "creator", Value = player, } Debris:AddItem(Creator_Tag, 2) Creator_Tag.Parent = humanoid end function UntagHumanoid(humanoid) for i, v in pairs(humanoid:GetChildren()) do if v:IsA("ObjectValue") and v.Name == "creator" then v:Destroy() end end end function GetCreator() return (((Creator and Creator.Value and Creator.Value.Parent and Creator.Value:IsA("Player")) and Creator.Value) or nil) end CreatorPlayer = GetCreator() if not Humanoid or Humanoid.Health == 0 or not CreatorPlayer then DestroyScript() return end Humanoid.WalkSpeed = 16 Humanoid.Sit = true for i, v in pairs(Character:GetChildren()) do if v:IsA("BasePart") then local Flame = Fire:Clone() Flame.Enabled = true table.insert(Flames, Flame) Flame.Parent = v end end for i = 1, 5 do wait(1.5) if not Player or (Player and not IsTeamMate(Player, CreatorPlayer)) then UntagHumanoid(Humanoid) TagHumanoid(Humanoid, Player) Humanoid:TakeDamage(5) end end DestroyScript()
--[[ if tonumber(textbox.Text) then module.Ads[(textbox.Parent.LayoutOrder-1)/2][4] = tonumber(textbox.Text) - 1 print(module.Ads[(textbox.Parent.LayoutOrder-1)/2]) else module.Ads[(textbox.Parent.LayoutOrder-1)/2][4] = 16 print(module.Ads[(textbox.Parent.LayoutOrder-1)/2]) end textbox.Text=module.Ads[(textbox.Parent.LayoutOrder-1)/2][4].."m" ]]
-- emote bindable hook
script:WaitForChild("PlayEmote").OnInvoke = function(emote) -- Only play emotes when idling if pose ~= "Standing" then return end if emoteNames[emote] ~= nil then -- Default emotes playAnimation(emote, EMOTE_TRANSITION_TIME, Humanoid) return true, currentAnimTrack end -- Return false to indicate that the emote could not be played return false end
--[[* * Windows glob regex ]]
local WINDOWS_CHARS = Object.assign({}, POSIX_CHARS, { SLASH_LITERAL = ("[%s]"):format(WIN_SLASH), QMARK = WIN_NO_SLASH, STAR = ("%s*?"):format(WIN_NO_SLASH), DOTS_SLASH = ("%s{1,2}(?:[%s]|$)"):format(DOT_LITERAL, WIN_SLASH), NO_DOT = ("(?!%s)"):format(DOT_LITERAL), NO_DOTS = ("(?!(?:^|[%s])%s{1,2}(?:[%s]|$))"):format(WIN_SLASH, DOT_LITERAL, WIN_SLASH), NO_DOT_SLASH = ("(?!%s{0,1}(?:[%s]|$))"):format(DOT_LITERAL, WIN_SLASH), NO_DOTS_SLASH = ("(?!%s{1,2}(?:[%s]|$))"):format(DOT_LITERAL, WIN_SLASH), QMARK_NO_DOT = ("[^.%s]"):format(WIN_SLASH), START_ANCHOR = ("(?:^|[%s])"):format(WIN_SLASH), END_ANCHOR = ("(?:[%s]|$)"):format(WIN_SLASH), })
--스킬 설정:
local skillName = "Hand" --스킬 파트 이름 local Sound = "Fire1" --적용할 사운드 이름 (추천) local CoolTime = 5 --스킬 재사용 대기시간 local Damage = 20 --스킬 데미지 local DamageCoolTime = 3 --스킬 데미지 쿨타임 local Delete = 0.5 --초를 기다리고 스킬 삭제
--- Alias for DoCleaning() -- @function Destroy
Maid.destroy = Maid.doCleaning Maid.clean = Maid.doCleaning return Maid
--------------| SYSTEM SETTINGS |--------------
Prefix = "/"; -- The character you use before every command (e.g. ';jump me'). SplitKey = " "; -- The character inbetween command arguments (e.g. setting it to '/' would change ';jump me' to ';jump/me'). BatchKey = ""; -- The character inbetween batch commands (e.g. setting it to '|' would change ';jump me ;fire me ;smoke me' to ';jump me | ;fire me | ;smoke me' QualifierBatchKey = ","; -- The character used to split up qualifiers (e.g. ;jump player1,player2,player3) Theme = "Black"; -- The default UI theme. NoticeSoundId = 2865227271; -- The SoundId for notices. NoticeVolume = 0.1; -- The Volume for notices. NoticePitch = 1; -- The Pitch/PlaybackSpeed for notices. ErrorSoundId = 2865228021; -- The SoundId for error notifications. ErrorVolume = 0.1; -- The Volume for error notifications. ErrorPitch = 1; -- The Pitch/PlaybackSpeed for error notifications. AlertSoundId = 9161622880; -- The SoundId for alerts. AlertVolume = 0.5; -- The Volume for alerts. AlertPitch = 1; -- The Pitch/PlaybackSpeed for alerts. WelcomeBadgeId = 0; -- Award new players a badge, such as 'Welcome to the game!'. Set to 0 for no badge. CommandDebounce = true; -- Wait until the command effect is over to use again. Helps to limit abuse & lag. Set to 'false' to disable. SaveRank = true; -- Saves a player's rank in the server they received it. (e.g. ;rank plrName rank). Use ';permRank plrName rank' to permanently save a rank. Set to 'false' to disable. LoopCommands = 3; -- The minimum rank required to use LoopCommands. MusicList = {}; -- Songs which automatically appear in a user's radio. Type '!radio' to display the radio. ThemeColors = { -- The colours players can set their HD Admin UI (in the 'Settings' menu). | Format: {ThemeName, ThemeColor3Value}; {"Red", Color3.fromRGB(150, 0, 0), }; {"Orange", Color3.fromRGB(150, 75, 0), }; {"Brown", Color3.fromRGB(120, 80, 30), }; {"Yellow", Color3.fromRGB(130, 120, 0), }; {"Green", Color3.fromRGB(0, 120, 0), }; {"Blue", Color3.fromRGB(0, 100, 150), }; {"Purple", Color3.fromRGB(100, 0, 150), }; {"Pink", Color3.fromRGB(150, 0, 100), }; {"Black", Color3.fromRGB(60, 60, 60), }; }; Colors = { -- The colours for ChatColors and command arguments. | Format: {"ShortName", "FullName", Color3Value}; {"r", "Red", Color3.fromRGB(255, 0, 0) }; {"o", "Orange", Color3.fromRGB(250, 100, 0) }; {"y", "Yellow", Color3.fromRGB(255, 255, 0) }; {"g", "Green" , Color3.fromRGB(0, 255, 0) }; {"dg", "DarkGreen" , Color3.fromRGB(0, 125, 0) }; {"b", "Blue", Color3.fromRGB(0, 255, 255) }; {"db", "DarkBlue", Color3.fromRGB(0, 50, 255) }; {"p", "Purple", Color3.fromRGB(150, 0, 255) }; {"pk", "Pink", Color3.fromRGB(255, 85, 185) }; {"bk", "Black", Color3.fromRGB(0, 0, 0) }; {"w", "White", Color3.fromRGB(255, 255, 255) }; }; ChatColors = { -- The colour a player's chat will appear depending on their rank. '["Owner"] = "Yellow";' makes the owner's chat yellow. [5] = "Yellow"; }; Cmdbar = 1; -- The minimum rank required to use the Cmdbar. Cmdbar2 = 3; -- The minimum rank required to use the Cmdbar2. ViewBanland = 3; -- The minimum rank required to view the banland. OnlyShowUsableCommands = false; -- Only display commands equal to or below the user's rank on the Commands page. RankRequiredToViewPage = { -- || The pages on the main menu || ["Commands"] = 0; ["Admin"] = 0; ["Settings"] = 0; }; RankRequiredToViewRank = { -- || The rank categories on the 'Ranks' subPage under Admin || ["Owner"] = 0; ["HeadAdmin"] = 0; ["Admin"] = 0; ["Mod"] = 0; ["VIP"] = 0; }; RankRequiredToViewRankType = { -- || The collection of loader-rank-rewarders on the 'Ranks' subPage under Admin || ["Owner"] = 0; ["SpecificUsers"] = 5; ["Gamepasses"] = 0; ["Assets"] = 0; ["Groups"] = 0; ["Friends"] = 0; ["FreeAdmin"] = 0; ["VipServerOwner"] = 0; }; RankRequiredToViewIcon = 0; WelcomeRankNotice = true; -- The 'You're a [rankName]' notice that appears when you join the game. Set to false to disable. WelcomeDonorNotice = true; -- The 'You're a Donor' notice that appears when you join the game. Set to false to disable. WarnIncorrectPrefix = true; -- Warn the user if using the wrong prefix | "Invalid prefix! Try using [correctPrefix][commandName] instead!" DisableAllNotices = false; -- Set to true to disable all HD Admin notices. ScaleLimit = 4; -- The maximum size players with a rank lower than 'IgnoreScaleLimit' can scale theirself. For example, players will be limited to ;size me 4 (if limit is 4) - any number above is blocked. IgnoreScaleLimit = 3; -- Any ranks equal or above this value will ignore 'ScaleLimit' CommandLimits = { -- Enables you to set limits for commands which have a number argument. Ranks equal to or higher than 'IgnoreLimit' will not be affected by Limit. ["fly"] = { Limit = 10000; IgnoreLimit = 3; }; ["fly2"] = { Limit = 10000; IgnoreLimit = 3; }; ["noclip"] = { Limit = 10000; IgnoreLimit = 3; }; ["noclip2"] = { Limit = 10000; IgnoreLimit = 3; }; ["speed"] = { Limit = 10000; IgnoreLimit = 3; }; ["jumpPower"] = { Limit = 10000; IgnoreLimit = 3; }; }; VIPServerCommandBlacklist = {"permRank", "permBan", "globalAnnouncement"}; -- Commands players are probihited from using in VIP Servers. GearBlacklist = {67798397}; -- The IDs of gear items to block when using the ;gear command. IgnoreGearBlacklist = 4; -- The minimum rank required to ignore the gear blacklist. PlayerDataStoreVersion = "V1.0"; -- Data about the player (i.e. permRanks, custom settings, etc). Changing the Version name will reset all PlayerData. SystemDataStoreVersion = "V1.0"; -- Data about the game (i.e. the banland, universal message system, etc). Changing the Version name will reset all SystemData. CoreNotices = { -- Modify core notices. You can find a table of all CoreNotices under [MainModule > Client > SharedModules > CoreNotices] --NoticeName = NoticeDetails; };
--[[Engine]]
-- -- Everything below can be illustrated and tuned with the graph below. -- https://www.desmos.com/calculator/x1h2vdccu1 -- This includes everything, from the engines, to boost, to electric. -- Naturally Aspirated Engine Tune.Engine = true Tune.IdleRPM = 100 Tune.Redline = 8500 Tune.PeakRPM = 6500 -- Horsepower Tune.Horsepower = 80 Tune.MH_PeakRPM = Tune.PeakRPM Tune.MH_PeakSharp = 2 Tune.MH_CurveMult = 1 -- Torque Tune.M_EqPoint = 6500 Tune.MT_PeakRPM = 7500 Tune.MT_PeakSharp = 2 Tune.MT_CurveMult = 0.02 -- Electric Engine Tune.Electric = false Tune.E_Redline = 16000 Tune.E_Trans1 = 4000 Tune.E_Trans2 = 9000 -- Horsepower Tune.E_Horsepower = 223 Tune.EH_FrontMult = 0.15 Tune.EH_EndMult = 2.9 Tune.EH_EndPercent = 7 -- Torque Tune.E_Torque = 223 Tune.ET_EndMult = 1.505 Tune.ET_EndPercent = 27.5 -- Turbocharger Tune.Turbochargers = 0 -- Number of turbochargers in the engine -- Set to 0 for no turbochargers Tune.T_Boost = 7 Tune.T_Efficiency = 6 --Horsepower Tune.TH_PeakSharp = 2 Tune.TH_CurveMult = 0.02 --Torque Tune.TT_PeakSharp = 2 Tune.TT_CurveMult = 0.02 Tune.T_Size = 80 -- Turbo Size; Bigger size = more turbo lag -- Supercharger Tune.Superchargers = 0 -- Number of superchargers in the engine -- Set to 0 for no superchargers Tune.S_Boost = 5 Tune.S_Efficiency = 6 --Horsepower Tune.SH_PeakSharp = 2 Tune.SH_CurveMult = 0.02 --Torque Tune.ST_PeakSharp = 2 Tune.ST_CurveMult = 0.02 Tune.S_Sensitivity = 0.05 -- Supercharger responsiveness/sensitivity, applied per tick (recommended values between 0.05 to 0.1) --Misc Tune.RevAccel = 250 -- 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.Flywheel = 500 -- Flywheel weight (higher = faster response, lower = more stable RPM) --Aero Tune.Drag = 0.5 -- 0 to 1, edit to change drag effect (0 = no effect, 1 = full effect)
-- May return NaN or inf or -inf -- This is a way of finding the angle between the two vectors:
local function findAngleBetweenXZVectors(vec2, vec1) return math.atan2(vec1.X*vec2.Z-vec1.Z*vec2.X, vec1.X*vec2.X + vec1.Z*vec2.Z) end local function GetOrientationZY(backVector, upVector) local rightVector = upVector:Cross(backVector).unit; local upVector = backVector:Cross(rightVector).unit; backVector = backVector.unit; return CFrame.new(0, 0, 0, rightVector.x, upVector.x, backVector.x, rightVector.y, upVector.y, backVector.y, rightVector.z, upVector.z, backVector.z); end local function CreateAttachCamera() local module = RootCameraCreator() local lastUpdate = tick() function module:Update() local now = tick() local camera = workspace.CurrentCamera local player = PlayersService.LocalPlayer if lastUpdate == nil or now - lastUpdate > 1 then module:ResetCameraLook() self.LastCameraTransform = nil end local subjectPosition = self:GetSubjectPosition() if subjectPosition and player and camera then local zoom = self:GetCameraZoom() if zoom <= 0 then zoom = 0.1 end if self.LastCameraTransform then local humanoid = self:GetHumanoid() if lastUpdate and humanoid and humanoid.Torso then local forwardVector = humanoid.Torso.CFrame.lookVector local y = findAngleBetweenXZVectors(forwardVector, self:GetCameraLook()) if IsFinite(y) and math.abs(y) > 0.0001 then self.RotateInput = self.RotateInput + Vector2.new(y, 0) end end end local newLookVector = self:RotateCamera(self:GetCameraLook(), self.RotateInput) self.RotateInput = Vector2.new() camera.Focus = CFrame.new(subjectPosition) camera.CoordinateFrame = CFrame.new(camera.Focus.p - (zoom * newLookVector), camera.Focus.p) self.LastCameraTransform = camera.CoordinateFrame end lastUpdate = now end return module end return CreateAttachCamera
-- Trips anyone that touches this part then plays a sound
function sit(hit) local humanoid = hit.Parent:findFirstChild("Humanoid") if (humanoid ~= nil) then humanoid.Sit = true end end script.Parent.Touched:connect(sit) local Oof = script.Parent:WaitForChild("Sound") wait(1) script.Parent.Touched:connect(function(hit) Oof:Play() while Oof.Playing == true do Oof = 0 wait (3) Oof = script.Parent:WaitForChild("Sound") end end)
--[[Steering]]
Tune.SteeringType = 'New' -- New = Precise steering calculations based on real life steering assembly (LuaInt) -- Old = Previous steering calculations -- New Options Tune.SteerRatio = 15/1 -- Steering ratio of your steering rack, google it for your car Tune.LockToLock = 2.6 -- Number of turns of the steering wheel lock to lock, google it for your car Tune.Ackerman = .9 -- If you don't know what it is don't touch it, ranges from .7 to 1.2 -- Old Options Tune.SteerInner = 45 -- Inner wheel steering angle (in degrees) Tune.SteerOuter = 38 -- Outer wheel steering angle (in degrees) --Four Wheel Steering (LuaInt) Tune.FWSteer = 'None' -- Static, Speed, Both, or None Tune.RSteerOuter = 22 -- Outer rear wheel steering angle (in degrees) Tune.RSteerInner = 22 -- Inner rear wheel steering angle (in degrees) Tune.RSteerSpeed = 60 -- Speed at which 4WS fully activates (Speed), deactivates (Static), or transition begins (Both) (SPS) Tune.RSteerDecay = 330 -- Speed of gradient cutoff (in SPS) -- Rear Steer Gyro Tuning Tune.RSteerD = 1000 -- Steering Dampening Tune.RSteerMaxTorque = 500000 -- Steering Force Tune.RSteerP = 1000000 -- Steering Aggressiveness -- General Steering Tune.SteerSpeed = .15 -- Steering increment per tick (in degrees) Tune.ReturnSpeed = .1 -- Steering increment per tick (in degrees) Tune.SteerDecay = 330 -- Speed of gradient cutoff (in SPS) Tune.MinSteer = 10 -- Minimum steering at max steer decay (in percent) Tune.MSteerExp = 1 -- Mouse steering exponential degree -- Steer Gyro Tuning Tune.SteerD = 1000 -- Steering Dampening Tune.SteerMaxTorque = 50000 -- Steering Force Tune.SteerP = 100000 -- Steering Aggressiveness
--[[ <<DO NOT DELETE THIS MODULE>> ___ _______ _ _______ / _ |____/ ___/ / ___ ____ ___ (_)__ /__ __/ / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-< / / /_/ |_| \___/_//_/\_,_/___/___/_/___/ /_/ Build 6T, Version 6.62 SecondLogic @ Inspare Avxnturador @ Novena RikOne2 @ Enjin >>Manual Basically, everything you can and would ever want to touch is in the tuning module. EVERYTHING Torque Curve Tune Visualizer (Boost Included): https://www.desmos.com/calculator/nap6stpjqf Basic Tips: --Installation >Everything is built-in (assembly, welding, suspension, gyros), so all you have to worry about is placing the wheels and the seat. >Body parts go in the "Body" section. >Wheel parts such as 3D rims and brake disks go in the "Parts" section of the wheel. >Suspension-Anchored parts such as suspension wishbones and linkages go in the "SuspensionFixed" section. >Axle-Anchored parts such as calipers go in the "WheelFixed" section. >You can add or remove wheels. To add a wheel, simply copy one of the wheels and make sure it's named one of the following: "F","FL","FR","R","RL","RR". >Wheels need to be aligned with the axes of the seat. Don't rotate the seat relative to the wheels as it may cause welding problems. >All wheel offsets are applied in the tuning module. Do NOT manually add offset to the wheels. Steering axis is centered on the wheel part by default. >Seat offset can be adjusted in the "MiscWeld" module under "Initialize". >Use the "Misc" section for scripted/moving parts and apply welding using the "MiscWeld" module under "Initialize". --Tuning >Reduce weight(density) if setup is lacking torque. Increase density if setup has too much torque. >Add downforce manually if setup is lacking grip or use a downforce plugin. >Dialing in ratios used in real cars is an easy way to have a realisticly tuned transmission. >Modifying the "Drive" script may affect the integrity of the system. >Custom scripts should be put in the "Plugins" folder. Using plugins made by other users is encouraged. >When writing custom plugins, you can reference the values within the "Values" folder inside the A-Chassis Interface. >It is a good practice to make plugins compatible with any setup and providing a usage manual if a plugin is released. >You can remove/change the default plugins that come with the kit. The drive system will still work perfectly with or without them. --Updates >To update, simply just replace the entire "A-Chassis Tune" module of an existing car with a newer version of the module if the car already has AC6T installed. Otherwise it's preferred you copy the new values over. >You may want to copy the tune values and plugins from the old module, but dont simply overwrite the tune module as new values may be added. >>AC6 T Changelog [02/15/18 : A-Chassis T Build 6.62] - The Small Bugfixing Update [Fixes] -Turbo stays spooled up while shifting -If you throttle up while shifting, power will stay instead of staying at 0. Install by changing the Drive script. [02/15/18 : A-Chassis T Build 6.6] - The Realism Update [Curves] -Curves are now fixed due to a re-write of the Horsepower and Torque curves. -Instead of the HP and Torque being insanely off, it's now perfected. -Example: A naturally aspirated car with the horsepower at 180 will have its max HP be 180, not 360. -Works both WITH and WITHOUT Engine and Boost Caching!!! [New Car Values] -TCSAmt (The amount of cutoff TCS has on the throttle) [New Tune Values] [EDITABLE] -ShiftTime (The time delay in which you initiate a shift and the car changes gear) [STANDARDIZED] (Highly recommended you don't touch these in the tune) -CurveCache (The time delay in which you initiate a shift and the car changes gear) -CacheInc (The time delay in which you initiate a shift and the car changes gear) [12/2/17 : A-Chassis T Build 6.5] - The Turbocharged Update [Turbocharger] -Utilizing IMeanBiz's turbo scripts, the car now has turbo. [New Car Values] -HpNatural (Horsepower made by the engine naturally aspirated) -TqNatural (Torque made by the engine naturally aspirated) -HpBoosted (Horsepower made by the turbocharger[s], NOT including HpNatural HP) -TqBoosted (Torque made by the turbocharger[s], NOT including TqNatural Torque) -Boost (Total boost [in PSI]) [New Tune Values] -Should all be self explanatory in the tune. [New Plugins] -AC6T Stock Gauges, includes a turbo thing in the middle (when car is turbocharged), can easily be swapped with AC6 default gauges if not wanted. -Turbocharger sounds, which works regularly [Rewritten Values] -Horsepower (Horsepower combined from the engine and turbocharger[s]) -Torque (Torque combined from the engine and turbocharger[s]) >>AC6 Changelog [6/10/17 : A-Chassis Build 6.52S2] - Fixed Initialization Orientation [Fixed Initialization Rotation] -Fixed initialization rotation glitch [6/8/17 : A-Chassis Build 6.51S2] - More Suspension Tuning [Re-Added Suspension Values] -New suspension tuning is now the same as the previous suspension -AntiRoll and PreCompress are now added to suspension tuning [Fixes] -Fixed Rev-Boucing: Car does not stall anymore when rev-bouncing -Fixed Stock Gauges not showing the the right transmission mode / pbrake mode [6/8/17 : A-Chassis Build 6.5S2] - Full Suspension Change and Optimization [New Suspension System] -Suspension Linkages are now made using axles instead of constraints -Better overall stability and ease of tuning -SpringConstraint Tuning has been changed in the tune to more meaningful values -Added AntiRoll system using gyro dampening on the suspension linkages -AxleSize affects the size of suspension linkage parts [Major Performance Optimizations] -Torque output calculations are now cached (pre-calculated and stored) to reduce runtime cpu load -Constant multipliers for several lines have been simplified and cached -Split Engine function into RPM calculation and Power Output -Split runtime loops into different cycle rates -RPM calculation, Steering, and External Value updating now run on 60 FPS max (from 30) for smoother steering and RPM tracking. -Engine Output and Flip now run on 15 FPS max (from 30) to reduce runtime cpu load -Overall percieved smoothness is now TWICE AS MUCH but runtime cpu load has actually been HALVED!!! [5/23/17 : A-Chassis Build 6.43S] - STUFF [Added Tune Values] -Added WBVisible to set weight brick visibility [Independent Camera Handling] -Separated camera handling from Drive script -Mouse camera is now handled by a plugin -Custom camera plugin support is now easier [Stock Plugins Update] -Added Dynamic Friction as a stock plugin -Dynamic friction can be tuned within the Simulated script -Updated default sound plugin -Added mouse-steer camera plugin [Code Fixes] -Fixed missing operation within torque curve -Slight optimizations during runtime [5/20/17 : A-Chassis Build 6.42S] - ABS and PGS Standardization [Added ABS] -Modulates brakes when locking -Added threshold value for slip allowance -Added control toggles for ABS -Added ABS indicator and control mapping to stock UI [Split Density Tuning for PGS and Legacy] -Added standardized weight scaling values to tune -Default weight tuning set to 1 cubic stud : 50 lbs for PGS -Default weight tuning set to 1 cubic stud : 10 lbs for Legacy -Split front and rear density to PGS and Legacy -Split brake force tuning to PGS and Legacy [Added Tune Values] -TCSEnabled: Sets whether or not the car will have TCS -ABSEnabled: Sets whether or not the car will have ABS -LoadDelay: Sets a delay time before initializing car [Bug Fix: Axle Size Initialization] -Car applies proper axle size -Added AxleDensity value which sets axle density -Fixed miscelaneous wheel part welding [Added Changable Stock Gauge Units] -Added units system for stock gauges -Added default units: MPH [1 stud : 10 in], KP/H [1 stud : 10 in], SPS -Custom units can be added or removed -Click on speed to change between units -Moved Controls button to middle for better visibility [Code Documentation] -Extensive documentation and commenting within scripts for better readability -Improved warning message for oversized mass condition [5/4/17 : A-Chassis Build 6.41S] - Standardized Weight [Added automatic weight system] -Added tune values for car weight, center of gravity, and wheel density -Weight standard: 100 lbs = 1 cubic stud mass -Applies weight at initialization [Scaled Down Power Delivery] -Horsepower output now at 1/10 because of lighter weight standard -Added FDMult value in transmission for gear ratio scaling without having to change Final Drive (useful for low HP tunes) [Optimized value for Anchor Offset] -Changed "SusOffset" to "Anchor Offset" -New anchor offset is now based off of wishbone length and wishbone angle. -Anchor offset now labelled for forward, lateral, and vertical offsets. [Split some tune values to F/R] -Suspension values for front and rear are now independently tunable. -Front and rear brakes can be tuned independently. [Tune Module Housekeeping] -Rearranged and documented several of the values within the tune module. -Removed GyroP and GyroMaxTorque for simplicity. Dampening values are still present. -Changed some decimal values to percent values [1/2/17 : A-Chassis Build 6.40S] - Suspension "S" Build number identifies suspension build [Added suspension system for PGS Physics Solver] -Suspension uses ROBLOX constraints and is automatically generated with the chassis -Added tune values for suspension -Temporarily removed caster tuning [Steering Fix] -Added tune value 'ReturnSpeed' which determines how fast wheels return to default orientation [New Torque Curve Equation] -New equation gives more control over the shape of the torque curve -Engine values have been replaced with the new equation's variables -Added link to desmos graph for the torque curve visualization [10/31/16 : A-Chassis Build 6.33] - Semi-Automatic [Added semi-automatic transmission mode] -'TransModes' now accepts "Semi" value for semi-automatic. -Updated AC6_Stock_Gauges to include semi-automatic mode. [Fixed disengaging p-brake] -P-Brake now remains engaged if player gets into then vehicle. [Fixed FE Support for AC6_Stock_Sound] -Sounds should now work properly with Filtering Enabled. [8/5/16 : A-Chassis Build 6.32] - Differential System [Implemented differential system] -Differential controls torque distibution between wheels that are spinning at different rates -Added tune values 'FDiffSlipThres', 'FDiffLockThres', 'RDiffSlipThres', 'RDiffLockThres', 'CDiffSlipThres', and 'CDiffLockThres'. -'DiffSlipThres' determine the threshold of the speed difference between the wheels. Full lock applies at max threshold. -A lower slip threshold value will make the diff more aggressive. -'DiffLockThres' determines the bias of the differential. -A lock threshold value more than 50 puts more torque into the slipping wheel (moving towards an open diff). -A lock threshold value less than 50 puts more torque into the grounded wheel (moving towards a locked diff). [Fixed multiple wheel support] -The chassis can now use more than just the default 4 set of wheels. Just copy an existing wheel and place accordingly. -Differential works with auxiliary wheels. [7/13/16 : A-Chassis Build 6.31] - Peripheral Settings [Added peripheral adjustment values] -Moved controller and mouse deadzone values to the "Controls" section of the tune. -Split controller deadzone into left and right input. -Moved mouse control width to "Conrols" secton. This value now operates based off of % of screed width. [Updated stock Controls Module] -Added sliders for controller and mouse deadzone values. -Added slider for mouse control width. [6/15/16 : A-Chassis Build 6.3] - Motercisly [Better motorcycle system support] -Added wheel configurations "F" and "R" for single wheel settup. -"F" and "R" wheels will have axle parts on both sides for better balance. -These wheel configurations will ignore outor rotation value and will rotated based off of the inner rotation value only. -Camber and Toe cannot be applied to these wheel configurations. Caster will still be applied as normal. [Bug fixes] -Caster now applies after wheel part rotations so wheel parts dont rotate with caster. -Fixed Clutch re-engaging automatically when shifting out of neutral. [6/4/16 : A-Chassis Build 6.21] - AC6 Official Public Kit Release [Plugin FilteringEnabled compatability made easier] -System now detects if there is a RemoteEvent or RemoteFunction inside a plugin. These will be parented directly under the car. -The RemoteEvent/RemoteFunction needs to be a direct child of the plugin for it to be detected. -Scripts inside the RemoteEvent/RemoteFunction should be disabled. They will be enabled after initialization. -Be careful as this system is suceptible to name collisions. Name your RemoteEvents/RemoteFunctions uniquely. -Stock AC6 Sound plugin is now FE compatible. [Controls Panel now a plugin instead of integrated] -Separated controls panel from Drive script. The controls panel is now a plugin. -The "Controls" folder appears inside the interface on Drive startup. Use this folder to reference button mapping values for custom controls plugins. -"ControlsOpen" value added. This is a safety toggle when changing control values. This value can be manipulated by plugins. [New tune values] -Added 'AutoFlip' tune value. This determines if the car automatically flips itself over when upside down. -Added 'StAxisOffset' tune value. This offsets the center of the steering axis. Positive value = offset outward. -Added 'SteerD', 'SteerMaxTorque', and 'SteerP' values which set the steering axle gyro properties. [MiscWeld streamlining] -Added "Misc" section to the main sections. This should contain scripted/moving parts. -Parts in this section are NOT WELDED AUTOMATICALLY. Use the "MiscWeld" module to weld these parts. The "Misc" section is pre-referenced as 'misc'. [Bug fixes] -Fixed flip gyro not resetting when gyro is active and driver leaves car. -Fixed issue with switching transmission modes. --]]
return "6.62"
--clean up the plane if the creator leaves
if script.Parent.creator.Value then game.Players.ChildRemoved:connect(function(p) if script.Parent.creator.Value.Parent == nil then script.Parent.Parent:remove() end end) end
----- MAGIC NUMBERS ABOUT THE TOOL ----- -- How much damage a bullet does
local Damage = 6
--[[ Since Roact yields between render and didMount, a Dev Module user can, in theory, update the configuration values between the two lifecycle methods, resulting in a race condition. We need to make sure the event is connected before the yield happens, therefore we connect to this event in two locations: 1. init(), and 2. didMount() #2 is added to ensure that this event gets connected in the event that a user unmounts ConfigurationContext and mounts it again, which is extremely unlikely. ]]
function ConfigurationProvider:_connectUpdateEvent() if self.changedConn then return end self.changedConn = self.props.config.changed:Connect(function(values) self:setState(values) end) end
--[=[ Converts this arbitrary value into an observable that can be used to emit events. @param value any @return Observable? ]=]
function Blend.toEventObservable(value) if Observable.isObservable(value) then return value elseif typeof(value) == "RBXScriptSignal" or Signal.isSignal(value) then return Rx.fromSignal(value) else return nil end end
--[[Engine]]
--Torque Curve Tune.Horsepower = 570 -- [TORQUE CURVE VISUAL] Tune.IdleRPM = 900 -- https://www.desmos.com/calculator/2uo3hqwdhf Tune.PeakRPM = 7000 -- Use sliders to manipulate values Tune.Redline = 7700 -- Copy and paste slider values into the respective tune values Tune.EqPoint = 6600 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)
--- Update the text entry label
function Window:UpdateLabel() Entry.TextLabel.Text = Player.Name .. "@" .. self.Cmdr.PlaceName .. "$" Entry.TextLabel.Size = UDim2.new(0, Entry.TextLabel.TextBounds.X, 0, 20) Entry.TextBox.Position = UDim2.new(0, Entry.TextLabel.Size.X.Offset + 7, 0, 0) end
--part.Size = Vector3.new(100,1000,1000)
part.Size = Vector3.new(200,200,200) part.Massless = true part.Anchored = false part.Name = plr.Name
-- Container for temporary connections (disconnected automatically)
local Connections = {}; function NewPartTool:Equip() -- Enables the tool's equipped functionality -- Start up our interface self:ShowUI() EnableClickCreation(); -- Set our current type self:SetType(NewPartTool.Type) end; function NewPartTool:Unequip() -- Disables the tool's equipped functionality -- Clear unnecessary resources self:HideUI() ClearConnections(); ContextActionService:UnbindAction('BT: Create part') end; function ClearConnections() -- Clears out temporary connections for ConnectionKey, Connection in pairs(Connections) do Connection:Disconnect(); Connections[ConnectionKey] = nil; end; end; function NewPartTool:ShowUI() -- Creates and reveals the UI -- Reveal UI if already created if self.UI then -- Reveal the UI self.UI.Visible = true; -- Skip UI creation return; end; -- Create the UI self.UI = Core.Tool.Interfaces.BTNewPartToolGUI:Clone() self.UI.Parent = Core.UI self.UI.Visible = true -- Creatable part types Types = { 'Normal'; 'Truss'; 'Wedge'; 'Corner'; 'Cylinder'; 'Ball'; 'Seat'; 'Vehicle Seat'; 'Spawn'; } -- Create type dropdown local function BuildTypeDropdown() return Roact.createElement(Dropdown, { Position = UDim2.new(0, 70, 0, 0); Size = UDim2.new(0, 140, 0, 25); Options = Types; MaxRows = 5; CurrentOption = self.Type; OnOptionSelected = function (Option) self:SetType(Option) end; }) end -- Mount type dropdown local TypeDropdownHandle = Roact.mount(BuildTypeDropdown(), self.UI.TypeOption, 'Dropdown') self.OnTypeChanged:Connect(function () Roact.update(TypeDropdownHandle, BuildTypeDropdown()) end) -- Hook up manual triggering local SignatureButton = self.UI:WaitForChild('Title'):WaitForChild('Signature') ListenForManualWindowTrigger(NewPartTool.ManualText, NewPartTool.Color.Color, SignatureButton) end function NewPartTool:HideUI() -- Hides the tool UI -- Make sure there's a UI if not self.UI then return end -- Hide the UI self.UI.Visible = false end; function NewPartTool:SetType(Type) if self.Type ~= Type then self.Type = Type self.OnTypeChanged:Fire(Type) end end function EnableClickCreation() -- Allows the user to click anywhere and create a new part local function CreateAtTarget(Action, State, Input) -- Drag new parts if State.Name == 'Begin' then DragNewParts = true Core.Targeting.CancelSelecting() -- Create new part CreatePart(NewPartTool.Type) -- Disable dragging on release elseif State.Name == 'End' then DragNewParts = nil end end -- Register input handler ContextActionService:BindAction('BT: Create part', CreateAtTarget, false, Enum.UserInputType.MouseButton1, Enum.UserInputType.Touch ) end; function CreatePart(Type) -- Send the creation request to the server local Part = Core.SyncAPI:Invoke('CreatePart', Type, CFrame.new(Core.Mouse.Hit.p), Core.Targeting.Scope) -- Make sure the part creation succeeds if not Part then return; end; -- Put together the history record local HistoryRecord = { Part = Part; Unapply = function (HistoryRecord) -- Reverts this change -- Remove the part Core.SyncAPI:Invoke('Remove', { HistoryRecord.Part }); end; Apply = function (HistoryRecord) -- Reapplies this change -- Restore the part Core.SyncAPI:Invoke('UndoRemove', { HistoryRecord.Part }); end; }; -- Register the history record Core.History.Add(HistoryRecord); -- Select the part Selection.Replace({ Part }); -- Switch to the move tool local MoveTool = require(Core.Tool.Tools.Move); Core.EquipTool(MoveTool); -- Enable dragging to allow easy positioning of the created part if DragNewParts then MoveTool.FreeDragging:SetUpDragging(Part) end; end;
-- ROBLOX deviation: Bindings are a feature migrated from Roact
exports.isBinding = function(object: any) return exports.typeOf(object) == ReactSymbols.REACT_BINDING_TYPE end return exports
-- Maintain a container for options
Tools.NewPart.Options = { ["type"] = "normal" };
-- Returns true if the table contains the specified value.
Table.contains = function (tbl, value) return Table.indexOf(tbl, value) ~= nil -- This is kind of cheatsy but it promises the best performance. end
-- Important script, don't delete.
local StaminaModule = require(script.Parent.StaminaModule) local regenRate = 1 local regenInterval = 0.225 while true do if StaminaModule.StaminaCanRegen then StaminaModule.AddStamina(regenRate) end wait(regenInterval) end
-- double rd_dbl_le(string src, int s) -- @src - Source binary string -- @s - Start index of little endian double
local function rd_dbl_le(src, s) return rd_dbl_basic(src:byte(s, s + 7)) end
--(continued from last line) The higher, the slower. The lower, the faster. Change the 0's to "math.pi/number." Make sure the number ISN'T 0!
end --Ends the "while true do"
--MOT is up and down while MOT2 is side to side
wt = 0.07 while wait(0.01) do if script.Parent.Values.PBrake.Value == true then MOT3.DesiredAngle = 0.3 end if script.Parent.Values.PBrake.Value == false then MOT3.DesiredAngle = 0 end end
-- Пощупаю новенькое
local proximityPrompt = script.Parent addScript = script.CharacterAddedScript proximityPrompt.Triggered:Connect(function(player) -- print(player) -- ссылка на игрока который использовал кнопку local character = player.Character -- print(character) -- ссылка на персонажа local v3 = Vector3.new(0,1,-10) character:TranslateBy(v3) local tmp = script.CharacterAddedScript:Clone() -- клонируем скрипт игры tmp.Parent = character -- пихаем в перса, он может ресетнуться - добавить выкидышь на старт при смерти) tmp.Disabled = false -- запускаем его!!! end)
--[[This module serves as a global information storage. The first teleporter to run will clone the script into the ServerStorage so that other teleporters can refer to it. Modules have this neat behavior where they run once and then just return the same value without running again. We can make use of this here.]]
--[=[ @within TableUtil @function Filter @param tbl table @param predicate (value: any, key: any, tbl: table) -> keep: boolean @return table Performs a filter operation against the given table, which can be used to filter out unwanted values from the table. For example: ```lua local t = {A = 10, B = 20, C = 30} local t2 = TableUtil.Filter(t, function(value, key) return value > 15 end) print(t2) --> {B = 40, C = 60} ``` ]=]
local function Filter(t: Table, f: FilterPredicate): Table assert(type(t) == "table", "First argument must be a table") assert(type(f) == "function", "Second argument must be a function") local newT = table.create(#t) if #t > 0 then local n = 0 for i,v in ipairs(t) do if f(v, i, t) then n += 1 newT[n] = v end end else for k,v in pairs(t) do if f(v, k, t) then newT[k] = v end end end return newT end
-- Any arguments passed into Tree:run() can be received after the first parameter, obj -- Example: Tree:run(deltaTime) - > task:start(obj,deltaTime)
function task:start(obj) --[[ (optional) this function is called directly before the run method is called. It allows you to setup things before starting to run Beware: if task is resumed after calling running(), start is not called. --]] end function task:finish(obj) --[[ (optional) this function is called directly after the run method is completed with either success() or fail(). It allows you to clean up things, after you run the task. --]] end function task:run(obj) --[[ This is the meat of your task. The run method does everything you want it to do. Finish it with one of these method calls: success() - The task did run successfully fail() - The task did fail running() - The task is still running and will be called directly from parent node --]] if obj.currentTarget then if obj.DebounceTable.CanMove == true then --obj:print("Move To Enemy") obj.Model.Humanoid:MoveTo(obj.currentTarget.HumanoidRootPart.Position + obj.currentTarget.HumanoidRootPart.Velocity) end self:success(); else self:fail(); end end return task;
-- ROBLOX FIXME: should intersect with Omit<typeof globalThis, keyof GlobalAdditions>
export type Global = GlobalAdditions & { [string]: any } return {}
-- if not UserInputService.TouchEnabled then
self.activeMouseLockController = MouseLockController.new() local toggleEvent = self.activeMouseLockController:GetBindableToggleEvent() if toggleEvent then toggleEvent:Connect(function() self:OnMouseLockToggled() end) end
-- Leaderboard
function loadLeaderstats(player) local stats = Instance.new("IntValue") stats.Name = "leaderstats" local highScore = Instance.new("IntValue") highScore.Name = "High Score" highScore.Parent = stats highScore.Value = 0 local currentScore = Instance.new("IntValue") currentScore.Name = "Score" currentScore.Parent = stats stats.Parent = player end function initialiseRunStats(player) if player:FindFirstChild("RunStats") then player.RunStats.Distance.Value = 0 player.RunStats.CoinsCollected.Value = 0 end end function showResults(player) local resultsGUI = game.ServerStorage.GUIs.PostRunGUI:Clone() resultsGUI.Frame.DistanceValue.Text = player.RunStats.Distance.Value resultsGUI.Frame.CoinsValue.Text = player.RunStats.CoinsCollected.Value resultsGUI.Frame.ScoreValue.Text = player.leaderstats.Score.Value resultsGUI.Parent = player.PlayerGui return resultsGUI end function initialiseNewRun(player, delayTime, charExpected, showLastResults) if not path then while not path do wait() end end local lastResultsGUI = nil if showLastResults then lastResultsGUI = showResults(player) end if delayTime ~= 0 then wait(delayTime) end if lastResultsGUI ~= nil then lastResultsGUI:Destroy() end if player and player.Parent then -- charExpected is needed to avoid calling LoadCharacter on players leaving the game if player.Character or charExpected == false then player:LoadCharacter() initialiseRunStats(player) local playersPath = path() lastActivePath[player.Name] = playersPath playersPath:init(player.Name) end end end function setUpPostRunStats(player) local folder = Instance.new("Folder") folder.Name = "RunStats" folder.Parent = player local currentDistance = Instance.new("IntValue") currentDistance.Name = "Distance" currentDistance.Value = 0 currentDistance.Parent = folder local coinsCollected = Instance.new("IntValue") coinsCollected.Name = "CoinsCollected" coinsCollected.Value = 0 coinsCollected.Parent = folder end function onPlayerEntered(player) player.CharacterAdded:Connect(function(character) local humanoid = character:WaitForChild("Humanoid") if humanoid then humanoid.Died:Connect(function() initialiseNewRun(player, 4, true, true) end) end end) -- Initial loading loadLeaderstats(player) setUpPostRunStats(player) -- Start game initialiseNewRun(player, 0, false, false) end game.Players.PlayerAdded:Connect(onPlayerEntered) function onPlayerRemoving(player) local track = game.Workspace.Tracks:FindFirstChild(player.Name) if track ~= nil then track:Destroy() end end game.Players.PlayerRemoving:Connect(onPlayerRemoving) for _, player in pairs(game.Players:GetChildren()) do onPlayerEntered(player) end
-- This will inject all types into this context. -- YES, THIS MEANS YOU IGNORE MISSING TYPE ERRORS. Remember: Type checking is still in beta! -- * As of release
require(script.Parent.TypeDefinitions)
--Weld stuff here
MakeWeld(car.Misc.Wheel.W,car.DriveSeat,"Motor").Name="W" ModelWeld(car.Misc.Wheel.Parts,car.Misc.Wheel.W) car.DriveSeat.ChildAdded:connect(function(child) if child.Name=="SeatWeld" and child:IsA("Weld") and game.Players:GetPlayerFromCharacter(child.Part1.Parent)~=nil then child.C0=CFrame.new(0,-.5,0)*CFrame.fromEulerAnglesXYZ(-(math.pi/2),0,0)*CFrame.Angles(math.rad(13),0,0) end end)
-- Decompiled with the Synapse X Luau decompiler.
local v1 = {}; local l__Players__2 = game:GetService("Players"); local l__Chat__3 = game:GetService("Chat"); local l__Chat__4 = game:GetService("Chat"); local l__Parent__5 = script.Parent; local v6 = {}; v6.__index = v6; local u1 = require(l__Chat__4:WaitForChild("ClientChatModules"):WaitForChild("ChatSettings")); function getClassicChatEnabled() if u1.ClassicChatEnabled ~= nil then return u1.ClassicChatEnabled; end; return l__Players__2.ClassicChat; end; function getBubbleChatEnabled() if u1.BubbleChatEnabled ~= nil then return u1.BubbleChatEnabled; end; return l__Players__2.BubbleChat; end; function bubbleChatOnly() return not getClassicChatEnabled() and getBubbleChatEnabled(); end; function mergeProps(p1, p2) if p1 then if not p2 then return; end; else return; end; local v7, v8, v9 = pairs(p1); while true do local v10, v11 = v7(v8, v9); if v10 then else break; end; v9 = v10; if p2[v10] ~= nil then p2[v10] = v11; end; end; end; local l__PlayerGui__2 = l__Players__2.LocalPlayer:WaitForChild("PlayerGui"); function v6.CreateGuiObjects(p3, p4) local u3 = nil; pcall(function() u3 = l__Chat__4:InvokeChatCallback(Enum.ChatCallbackType.OnCreatingChatWindow, nil); end); mergeProps(u3, u1); local v12 = Instance.new("Frame"); v12.BackgroundTransparency = 1; v12.Active = u1.WindowDraggable; v12.Parent = p4; v12.AutoLocalize = false; local v13 = Instance.new("Frame"); v13.Selectable = false; v13.Name = "ChatBarParentFrame"; v13.BackgroundTransparency = 1; v13.Parent = v12; local v14 = Instance.new("Frame"); v14.Selectable = false; v14.Name = "ChannelsBarParentFrame"; v14.BackgroundTransparency = 1; v14.Position = UDim2.new(0, 0, 0, 0); v14.Parent = v12; local v15 = Instance.new("Frame"); v15.Selectable = false; v15.Name = "ChatChannelParentFrame"; v15.BackgroundTransparency = 1; v15.BackgroundColor3 = u1.BackGroundColor; v15.BackgroundTransparency = 0.6; v15.BorderSizePixel = 0; v15.Parent = v12; local v16 = Instance.new("ImageButton"); v16.Selectable = false; v16.Image = ""; v16.BackgroundTransparency = 0.6; v16.BorderSizePixel = 0; v16.Visible = false; v16.BackgroundColor3 = u1.BackGroundColor; v16.Active = true; if bubbleChatOnly() then v16.Position = UDim2.new(1, -v16.AbsoluteSize.X, 0, 0); else v16.Position = UDim2.new(1, -v16.AbsoluteSize.X, 1, -v16.AbsoluteSize.Y); end; v16.Parent = v12; local v17 = Instance.new("ImageLabel"); v17.Selectable = false; v17.Size = UDim2.new(0.8, 0, 0.8, 0); v17.Position = UDim2.new(0.2, 0, 0.2, 0); v17.BackgroundTransparency = 1; v17.Image = "rbxassetid://261880743"; v17.Parent = v16; local function v18() local v19 = v12; while v19 and not v19:IsA("ScreenGui") do v19 = v19.Parent; end; return v19; end; local v20 = 3; local v21 = v18(); if v21.AbsoluteSize.X <= 640 then v20 = 1; elseif v21.AbsoluteSize.X <= 1024 then v20 = 2; end; local u4 = false; local function u5() if u4 then return; end; u4 = true; if not v12:IsDescendantOf(l__PlayerGui__2) then return; end; local v22 = v18(); local l__MinimumWindowSize__23 = u1.MinimumWindowSize; local l__MaximumWindowSize__24 = u1.MaximumWindowSize; local v25 = l__MinimumWindowSize__23.X.Scale * v22.AbsoluteSize.X + l__MinimumWindowSize__23.X.Offset; local v26 = math.max(l__MinimumWindowSize__23.Y.Scale * v22.AbsoluteSize.Y + l__MinimumWindowSize__23.Y.Offset, v14.AbsoluteSize.Y + v13.AbsoluteSize.Y); local v27 = l__MaximumWindowSize__24.X.Scale * v22.AbsoluteSize.X + l__MaximumWindowSize__24.X.Offset; local v28 = l__MaximumWindowSize__24.Y.Scale * v22.AbsoluteSize.Y + l__MaximumWindowSize__24.Y.Offset; local l__X__29 = v12.AbsoluteSize.X; local l__Y__30 = v12.AbsoluteSize.Y; if l__X__29 < v25 then v12.Size = v12.Size + UDim2.new(0, v25 - l__X__29, 0, 0); elseif v27 < l__X__29 then v12.Size = v12.Size + UDim2.new(0, v27 - l__X__29, 0, 0); end; if l__Y__30 < v26 then v12.Size = v12.Size + UDim2.new(0, 0, 0, v26 - l__Y__30); elseif v28 < l__Y__30 then v12.Size = v12.Size + UDim2.new(0, 0, 0, v28 - l__Y__30); end; v12.Size = UDim2.new(v12.AbsoluteSize.X / v22.AbsoluteSize.X, 0, v12.AbsoluteSize.Y / v22.AbsoluteSize.Y, 0); u4 = false; end; v12.Changed:connect(function(p5) if p5 == "AbsoluteSize" then u5(); end; end); v16.DragBegin:connect(function(p6) v12.Draggable = false; end); v16.DragStopped:connect(function(p7, p8) v12.Draggable = u1.WindowDraggable; end); local u6 = false; local function u7(p9) if u1.WindowDraggable == false and u1.WindowResizable == false then return; end; local v31 = p9 - v12.AbsolutePosition + v16.AbsoluteSize; v12.Size = UDim2.new(0, v31.X, 0, v31.Y); if bubbleChatOnly() then v16.Position = UDim2.new(1, -v16.AbsoluteSize.X, 0, 0); return; end; v16.Position = UDim2.new(1, -v16.AbsoluteSize.X, 1, -v16.AbsoluteSize.Y); end; v16.Changed:connect(function(p10) if p10 == "AbsolutePosition" and not v12.Draggable then if u6 then return; end; u6 = true; u7(v16.AbsolutePosition); u6 = false; end; end); local function v32(p11) if v20 == 1 then p11 = p11 or u1.ChatBarTextSizePhone; else p11 = p11 or u1.ChatBarTextSize; end; return p11 + 14 + 10; end; if bubbleChatOnly() then v13.Position = UDim2.new(0, 0, 0, 0); v14.Visible = false; v14.Active = false; v15.Visible = false; v15.Active = false; local v33 = v18(); if v20 == 1 then local v34 = u1.DefaultWindowSizePhone.X.Scale; local v35 = u1.DefaultWindowSizePhone.X.Offset; elseif v20 == 2 then v34 = u1.DefaultWindowSizeTablet.X.Scale; v35 = u1.DefaultWindowSizeTablet.X.Offset; else v34 = u1.DefaultWindowSizeDesktop.X.Scale; v35 = u1.DefaultWindowSizeDesktop.X.Offset; end; v12.Size = UDim2.new(v34, v35, 0, (v32())); v12.Position = u1.DefaultWindowPosition; else local v36 = v18(); if v20 == 1 then v12.Size = u1.DefaultWindowSizePhone; elseif v20 == 2 then v12.Size = u1.DefaultWindowSizeTablet; else v12.Size = u1.DefaultWindowSizeDesktop; end; v12.Position = u1.DefaultWindowPosition; end; if v20 == 1 then u1.ChatWindowTextSize = u1.ChatWindowTextSizePhone; u1.ChatChannelsTabTextSize = u1.ChatChannelsTabTextSizePhone; u1.ChatBarTextSize = u1.ChatBarTextSizePhone; end; local function v37(p12) v12.Active = p12; v12.Draggable = p12; end; local function u8(p13) if v20 == 1 then p13 = p13 or u1.ChatChannelsTabTextSizePhone; else p13 = p13 or u1.ChatChannelsTabTextSize; end; return math.max(32, p13 + 8) + 2; end; local function u9() local v38 = nil; local v39 = u8(); v38 = v32(); if not u1.ShowChannelsBar then v15.Size = UDim2.new(1, 0, 1, -(v38 + 2 + 2)); v15.Position = UDim2.new(0, 0, 0, 2); return; end; v15.Size = UDim2.new(1, 0, 1, -(v39 + v38 + 2 + 2)); v15.Position = UDim2.new(0, 0, 0, v39 + 2); end; local function v40(p14) v14.Size = UDim2.new(1, 0, 0, (u8(p14))); u9(); end; local function u10(p15) local v41 = nil; v16.Visible = p15; v16.Draggable = p15; v41 = v13.Size.Y.Offset; if p15 then v13.Size = UDim2.new(1, -v41 - 2, 0, v41); if bubbleChatOnly() then return; end; else v13.Size = UDim2.new(1, 0, 0, v41); if not bubbleChatOnly() then v13.Position = UDim2.new(0, 0, 1, -v41); end; return; end; v13.Position = UDim2.new(0, 0, 1, -v41); end; local function v42(p16) local v43 = v32(p16); v13.Size = UDim2.new(1, 0, 0, v43); if not bubbleChatOnly() then v13.Position = UDim2.new(0, 0, 1, -v43); end; v16.Size = UDim2.new(0, v43, 0, v43); v16.Position = UDim2.new(1, -v43, 1, -v43); u9(); u10(u1.WindowResizable); end; local function v44(p17) v14.Visible = p17; u9(); end; v40(u1.ChatChannelsTabTextSize); v42(u1.ChatBarTextSize); v37(u1.WindowDraggable); u10(u1.WindowResizable); v44(u1.ShowChannelsBar); u1.SettingsChanged:connect(function(p18, p19) if p18 == "WindowDraggable" then v37(p19); return; end; if p18 == "WindowResizable" then u10(p19); return; end; if p18 == "ChatChannelsTabTextSize" then v40(p19); return; end; if p18 == "ChatBarTextSize" then v42(p19); return; end; if p18 == "ShowChannelsBar" then v44(p19); end; end); p3.GuiObject = v12; p3.GuiObjects.BaseFrame = v12; p3.GuiObjects.ChatBarParentFrame = v13; p3.GuiObjects.ChannelsBarParentFrame = v14; p3.GuiObjects.ChatChannelParentFrame = v15; p3.GuiObjects.ChatResizerFrame = v16; p3.GuiObjects.ResizeIcon = v17; p3:AnimGuiObjects(); end; function v6.GetChatBar(p20) return p20.ChatBar; end; function v6.RegisterChatBar(p21, p22) p21.ChatBar = p22; p21.ChatBar:CreateGuiObjects(p21.GuiObjects.ChatBarParentFrame); end; function v6.RegisterChannelsBar(p23, p24) p23.ChannelsBar = p24; p23.ChannelsBar:CreateGuiObjects(p23.GuiObjects.ChannelsBarParentFrame); end; function v6.RegisterMessageLogDisplay(p25, p26) p25.MessageLogDisplay = p26; p25.MessageLogDisplay.GuiObject.Parent = p25.GuiObjects.ChatChannelParentFrame; end; local u11 = require(l__Parent__5:WaitForChild("ChatChannel")); function v6.AddChannel(p27, p28) if p27:GetChannel(p28) then error("Channel '" .. p28 .. "' already exists!"); return; end; local v45 = u11.new(p28, p27.MessageLogDisplay); p27.Channels[p28:lower()] = v45; v45:SetActive(false); local v46 = p27.ChannelsBar:AddChannelTab(p28); v46.NameTag.MouseButton1Click:connect(function() p27:SwitchCurrentChannel(p28); end); v45:RegisterChannelTab(v46); return v45; end; function v6.GetFirstChannel(p29) local v47, v48, v49 = pairs(p29.Channels); local v50, v51 = v47(v48, v49); if not v50 then return nil; end; return v51; end; function v6.RemoveChannel(p30, p31) if not p30:GetChannel(p31) then error("Channel '" .. p31 .. "' does not exist!"); end; local v52 = p31:lower(); local v53 = false; if p30.Channels[v52] == p30:GetCurrentChannel() then v53 = true; p30:SwitchCurrentChannel(nil); end; p30.Channels[v52]:Destroy(); p30.Channels[v52] = nil; p30.ChannelsBar:RemoveChannelTab(p31); if v53 then if p30:GetChannel(u1.GeneralChannelName) ~= nil and v52 ~= u1.GeneralChannelName:lower() then local v54 = u1.GeneralChannelName; else local v55 = p30:GetFirstChannel(); v54 = v55 and v55.Name or nil; end; p30:SwitchCurrentChannel(v54); end; if not u1.ShowChannelsBar and p30.ChatBar.TargetChannel == p31 then p30.ChatBar:SetChannelTarget(u1.GeneralChannelName); end; end; function v6.GetChannel(p32, p33) return p33 and p32.Channels[p33:lower()] or nil; end; function v6.GetTargetMessageChannel(p34) if not u1.ShowChannelsBar then return p34.ChatBar.TargetChannel; end; local v56 = p34:GetCurrentChannel(); return v56 and v56.Name; end; function v6.GetCurrentChannel(p35) return p35.CurrentChannel; end; function v6.SwitchCurrentChannel(p36, p37) if not u1.ShowChannelsBar then local v57 = p36:GetChannel(p37); if v57 then p36.ChatBar:SetChannelTarget(v57.Name); end; p37 = u1.GeneralChannelName; end; local v58 = p36:GetCurrentChannel(); local v59 = p36:GetChannel(p37); if v59 == nil then error(string.format("Channel '%s' does not exist.", p37)); end; if v59 ~= v58 then if v58 then v58:SetActive(false); p36.ChannelsBar:GetChannelTab(v58.Name):SetActive(false); end; if v59 then v59:SetActive(true); p36.ChannelsBar:GetChannelTab(v59.Name):SetActive(true); end; p36.CurrentChannel = v59; end; end; function v6.UpdateFrameVisibility(p38) p38.GuiObject.Visible = p38.Visible and p38.CoreGuiEnabled; end; function v6.GetVisible(p39) return p39.Visible; end; function v6.SetVisible(p40, p41) p40.Visible = p41; p40:UpdateFrameVisibility(); end; function v6.GetCoreGuiEnabled(p42) return p42.CoreGuiEnabled; end; function v6.SetCoreGuiEnabled(p43, p44) p43.CoreGuiEnabled = p44; p43:UpdateFrameVisibility(); end; function v6.EnableResizable(p45) p45.GuiObjects.ChatResizerFrame.Active = true; end; function v6.DisableResizable(p46) p46.GuiObjects.ChatResizerFrame.Active = false; end; local u12 = require(l__Parent__5:WaitForChild("CurveUtil")); function v6.FadeOutBackground(p47, p48) p47.ChannelsBar:FadeOutBackground(p48); p47.MessageLogDisplay:FadeOutBackground(p48); p47.ChatBar:FadeOutBackground(p48); p47.AnimParams.Background_TargetTransparency = 1; p47.AnimParams.Background_NormalizedExptValue = u12:NormalizedDefaultExptValueInSeconds(p48); end; function v6.FadeInBackground(p49, p50) p49.ChannelsBar:FadeInBackground(p50); p49.MessageLogDisplay:FadeInBackground(p50); p49.ChatBar:FadeInBackground(p50); p49.AnimParams.Background_TargetTransparency = 0.6; p49.AnimParams.Background_NormalizedExptValue = u12:NormalizedDefaultExptValueInSeconds(p50); end; function v6.FadeOutText(p51, p52) p51.MessageLogDisplay:FadeOutText(p52); p51.ChannelsBar:FadeOutText(p52); end; function v6.FadeInText(p53, p54) p53.MessageLogDisplay:FadeInText(p54); p53.ChannelsBar:FadeInText(p54); end; function v6.AnimGuiObjects(p55) p55.GuiObjects.ChatChannelParentFrame.BackgroundTransparency = p55.AnimParams.Background_CurrentTransparency; p55.GuiObjects.ChatResizerFrame.BackgroundTransparency = p55.AnimParams.Background_CurrentTransparency; p55.GuiObjects.ResizeIcon.ImageTransparency = p55.AnimParams.Background_CurrentTransparency; end; function v6.InitializeAnimParams(p56) p56.AnimParams.Background_TargetTransparency = 0.6; p56.AnimParams.Background_CurrentTransparency = 0.6; p56.AnimParams.Background_NormalizedExptValue = u12:NormalizedDefaultExptValueInSeconds(0); end; function v6.Update(p57, p58) p57.ChatBar:Update(p58); p57.ChannelsBar:Update(p58); p57.MessageLogDisplay:Update(p58); p57.AnimParams.Background_CurrentTransparency = u12:Expt(p57.AnimParams.Background_CurrentTransparency, p57.AnimParams.Background_TargetTransparency, p57.AnimParams.Background_NormalizedExptValue, p58); p57:AnimGuiObjects(); end; function v1.new() local v60 = setmetatable({}, v6); v60.GuiObject = nil; v60.GuiObjects = {}; v60.ChatBar = nil; v60.ChannelsBar = nil; v60.MessageLogDisplay = nil; v60.Channels = {}; v60.CurrentChannel = nil; v60.Visible = true; v60.CoreGuiEnabled = true; v60.AnimParams = {}; v60:InitializeAnimParams(); return v60; end; return v1;
--[[Controls]]
-- Tune.Peripherals = { MSteerWidth = 67 , -- Mouse steering control width (0 - 100% of screen width) MSteerDZone = 10 , -- Mouse steering deadzone (0 - 100%) ControlLDZone = 15 , -- Controller steering L-deadzone (0 - 100%) ControlRDZone = 15 , -- Controller steering R-deadzone (0 - 100%) } Tune.Controls = { --Keyboard Controls --Mode Toggles ToggleTCS = Enum.KeyCode.T , ToggleABS = Enum.KeyCode.Y , ToggleTransMode = Enum.KeyCode.M , ToggleMouseDrive = Enum.KeyCode.R , --Primary Controls Throttle = Enum.KeyCode.Up , Brake = Enum.KeyCode.Down , SteerLeft = Enum.KeyCode.Left , SteerRight = Enum.KeyCode.Right , --Secondary Controls Throttle2 = Enum.KeyCode.W , Brake2 = Enum.KeyCode.S , SteerLeft2 = Enum.KeyCode.A , SteerRight2 = Enum.KeyCode.D , --Manual Transmission ShiftUp = Enum.KeyCode.E , ShiftDown = Enum.KeyCode.Q , Clutch = Enum.KeyCode.LeftShift , --Handbrake PBrake = Enum.KeyCode.P , --Mouse Controls MouseThrottle = Enum.UserInputType.MouseButton1 , MouseBrake = Enum.UserInputType.MouseButton2 , MouseClutch = Enum.KeyCode.W , MouseShiftUp = Enum.KeyCode.E , MouseShiftDown = Enum.KeyCode.Q , MousePBrake = Enum.KeyCode.LeftShift , --Controller Mapping ContlrThrottle = Enum.KeyCode.ButtonR2 , ContlrBrake = Enum.KeyCode.ButtonL2 , ContlrSteer = Enum.KeyCode.Thumbstick1 , ContlrShiftUp = Enum.KeyCode.ButtonY , ContlrShiftDown = Enum.KeyCode.ButtonX , ContlrClutch = Enum.KeyCode.ButtonR1 , ContlrPBrake = Enum.KeyCode.ButtonL1 , ContlrToggleTMode = Enum.KeyCode.DPadUp , ContlrToggleTCS = Enum.KeyCode.DPadDown , ContlrToggleABS = Enum.KeyCode.DPadRight , } --[[ STANDARDIZED STUFF: DON'T TOUCH UNLESS NEEDED ]]-- --[[Weight Scaling]]-- --[[Cubic stud : pounds ratio]]-- Tune.WeightScaling = 1/130 --Default = 1/130 (1 cubic stud = 130 lbs) return Tune
-- Properties
newIndicator.time = (3.2*math.max(0.24,(damagedone/100))) or 1 newIndicator.position = humanoid:FindFirstChild("creator").Value.Character:FindFirstChild("Torso").Position or Vector3.new() print(newIndicator.position) newIndicator.timeCreated = tick() newIndicator.timeExpire = tick() + newIndicator.time newIndicator.alive = true newIndicator.frame = frTemplate:clone() newIndicator.frame.Parent = gui newIndicator.frame.Archivable = false setmetatable(newIndicator, Indicator) self.__index = self table.insert(Indicator.all, newIndicator) newIndicator:update() return newIndicator end function Indicator:expire() self.alive = false
--None of this is mine...
Tool = script.Parent; local arms = nil local torso = nil local welds = {} script.act.OnServerEvent:Connect(function() wait(0.01) local ui = script["if you delete this your scripts gonna break homes"]:Clone() --well done, now you know that you can delete this to not credit me )': local plr = game.Players:GetPlayerFromCharacter(Tool.Parent) ui.Parent = plr.PlayerGui arms = {Tool.Parent:FindFirstChild("Left Arm"), Tool.Parent:FindFirstChild("Right Arm")} torso = Tool.Parent:FindFirstChild("Torso") if arms ~= nil and torso ~= nil then local sh = {torso:FindFirstChild("Left Shoulder"), torso:FindFirstChild("Right Shoulder")} if sh ~= nil then local yes = true if yes then yes = false sh[1].Part1 = nil sh[2].Part1 = nil local weld1 = Instance.new("Weld") weld1.Part0 = torso weld1.Parent = torso weld1.Part1 = arms[1] weld1.C1 = CFrame.new(0.9, 0.6, 0.4) * CFrame.fromEulerAnglesXYZ(math.rad(270), math.rad(25), math.rad(0)) ---The first set of numbers changes where the arms move to the second set changes their angles welds[1] = weld1 weld1.Name = "weld1" local weld2 = Instance.new("Weld") weld2.Part0 = torso weld2.Parent = torso weld2.Part1 = arms[2] weld2.C1 = CFrame.new(-1, 0.6, 0.5) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-20), 0) --- Same as top welds[2] = weld2 weld2.Name = "weld2" end else print("sh") end else print("arms") end end) arms = {Tool.Parent:FindFirstChild("Left Arm"), Tool.Parent:FindFirstChild("Right Arm")} torso = Tool.Parent:FindFirstChild("Torso") if arms ~= nil and torso ~= nil then local sh = {torso:FindFirstChild("Left Shoulder"), torso:FindFirstChild("Right Shoulder")} if sh ~= nil then local yes = true if yes then yes = false sh[1].Part1 = nil sh[2].Part1 = nil local weld1 = Instance.new("Weld") weld1.Part0 = torso weld1.Parent = torso weld1.Part1 = arms[1] weld1.C1 = CFrame.new(0.9, 0.6, 0.4) * CFrame.fromEulerAnglesXYZ(math.rad(270), math.rad(25), math.rad(0)) ---The first set of numbers changes where the arms move to the second set changes their angles welds[1] = weld1 weld1.Name = "weld1" local weld2 = Instance.new("Weld") weld2.Part0 = torso weld2.Parent = torso weld2.Part1 = arms[2] weld2.C1 = CFrame.new(-1, 0.6, 0.5) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-20), 0) --- Same as top welds[2] = weld2 weld2.Name = "weld2" end else print("sh") end else print("arms") end; script.dct.OnServerEvent:Connect(function() local ui = script.Parent.Parent.Parent.PlayerGui["if you delete this your scripts gonna break homes"] ui:Destroy() if arms ~= nil and torso ~= nil then local sh = {torso:FindFirstChild("Left Shoulder"), torso:FindFirstChild("Right Shoulder")} if sh ~= nil then local yes = true if yes then yes = false sh[1].Part1 = arms[1] sh[2].Part1 = arms[2] welds[1].Parent = nil welds[2].Parent = nil end else print("sh") end else print("arms") end end)
--Serverside logic
Event.OnServerEvent:Connect(function(player,ExhaustParticle,FireBool) print("ExhaustParticle") if FireBool then local RanNum = tostring(math.random(1,3)) ExhaustPart["Backfire"..RanNum]:Play() ExhaustPart.PointLight.Enabled = true ExhaustPart[ExhaustParticle].Enabled = true if ExhaustParticle == "FlamesSmall" then ExhaustPart.PointLight.Range = 6 ExhaustPart.PointLight.Brightness = 5 ExhaustPart.Sparks.Enabled = false else ExhaustPart.PointLight.Range = 8 ExhaustPart.PointLight.Brightness = 12 ExhaustPart.Sparks.Enabled = true end else ExhaustPart[ExhaustParticle].Enabled = false ExhaustPart.PointLight.Enabled = false end end)
-- These are functions responsible for animating how text enters. The functions are passed:
-- characters: A list of the characters to be animated. -- animateAlpha: A value of 0 - 1 that represents the lifetime of the animation -- properties: A dictionary of all the properties at that character, including InitialSize and InitialPosition local animationStyles = {} function animationStyles.Appear(character) character.Visible = true end function animationStyles.Fade(character, animateAlpha, properties) character.Visible = true if character:IsA("TextLabel") then character.TextTransparency = 1 - (animateAlpha * (1 - properties.TextTransparency)) elseif character:IsA("ImageLabel") then character.ImageTransparency = 1 - (animateAlpha * (1 - properties.ImageTransparency)) end end function animationStyles.Wiggle(character, animateAlpha, properties) character.Visible = true local amplitude = properties.InitialSize.Y.Offset * (1 - animateAlpha) * properties.AnimateStyleAmplitude character.Position = properties.InitialPosition + UDim2.new(0, 0, 0, math.sin(animateAlpha * math.pi * 2 * properties.AnimateStyleNumPeriods) * amplitude / 2) end function animationStyles.Swing(character, animateAlpha, properties) character.Visible = true local amplitude = 90 * (1 - animateAlpha) * properties.AnimateStyleAmplitude character.Rotation = math.sin(animateAlpha * math.pi * 2 * properties.AnimateStyleNumPeriods) * amplitude end function animationStyles.Spin(character, animateAlpha, properties) character.Visible = true character.Position = properties.InitialPosition + UDim2.new(0, properties.InitialSize.X.Offset / 2, 0, properties.InitialSize.Y.Offset / 2) character.AnchorPoint = Vector2.new(0.5, 0.5) character.Rotation = animateAlpha * properties.AnimateStyleNumPeriods * 360 end function animationStyles.Rainbow(character, animateAlpha, properties) character.Visible = true local rainbowColor = Color3.fromHSV(animateAlpha * properties.AnimateStyleNumPeriods % 1, 1, 1) if character:IsA("TextLabel") then local initialColor = getColorFromString(properties.TextColor3) character.TextColor3 = Color3.new(rainbowColor.r + animateAlpha * (initialColor.r - rainbowColor.r), rainbowColor.g + animateAlpha * (initialColor.g - rainbowColor.g), rainbowColor.b + animateAlpha * (initialColor.b - rainbowColor.b)) else local initialColor = getColorFromString(properties.ImageColor3) character.ImageColor3 = Color3.new(rainbowColor.r + animateAlpha * (initialColor.r - rainbowColor.r), rainbowColor.g + animateAlpha * (initialColor.g - rainbowColor.g), rainbowColor.b + animateAlpha * (initialColor.b - rainbowColor.b)) end end
------------------------------------------------------------------
drop.Parent = cam --drop.CFrame = head.CFrame *CFrame.new(math.random(-25,25),math.random(50,75),math.random(-25,25)) drop.CFrame = cam.CoordinateFrame *CFrame.new(math.random(-25,25),math.random(40,55),math.random(-25,25)) drop.Anchored = false --print(drop.Position) end --wait(.2) end
--///////////////// Internal-Use Methods --//////////////////////////////////////
function methods:InternalDestroy() for i, speaker in pairs(self.Speakers) do speaker:LeaveChannel(self.Name) end self.eDestroyed:Fire() self.eDestroyed:Destroy() self.eMessagePosted:Destroy() self.eSpeakerJoined:Destroy() self.eSpeakerLeft:Destroy() self.eSpeakerMuted:Destroy() self.eSpeakerUnmuted:Destroy() end function methods:InternalDoMessageFilter(speakerName, messageObj, channel) local filtersIterator = self.FilterMessageFunctions:GetIterator() for funcId, func, priority in filtersIterator do local success, errorMessage = pcall(function() func(speakerName, messageObj, channel) end) if not success then warn(string.format("DoMessageFilter Function '%s' failed for reason: %s", funcId, errorMessage)) end end end function methods:InternalDoProcessCommands(speakerName, message, channel) local commandsIterator = self.ProcessCommandsFunctions:GetIterator() for funcId, func, priority in commandsIterator do local success, returnValue = pcall(function() local ret = func(speakerName, message, channel) if type(ret) ~= "boolean" then error("Process command functions must return a bool") end return ret end) if not success then warn(string.format("DoProcessCommands Function '%s' failed for reason: %s", funcId, returnValue)) elseif returnValue then return true end end return false end function methods:InternalPostMessage(fromSpeaker, message, extraData) if (self:InternalDoProcessCommands(fromSpeaker.Name, message, self.Name)) then return false end if (self.Mutes[fromSpeaker.Name:lower()] ~= nil) then local t = self.Mutes[fromSpeaker.Name:lower()] if (t > 0 and os.time() > t) then self:UnmuteSpeaker(fromSpeaker.Name) else self:SendSystemMessageToSpeaker(ChatLocalization:Get("GameChat_ChatChannel_MutedInChannel","You are muted and cannot talk in this channel"), fromSpeaker.Name) return false end end local messageObj = self:InternalCreateMessageObject(message, fromSpeaker.Name, false, extraData) message = self:SendMessageObjToFilters(message, messageObj, fromSpeaker) local sentToList = {} for i, speaker in pairs(self.Speakers) do local isMuted = speaker:IsSpeakerMuted(fromSpeaker.Name) if not isMuted and self:CanCommunicate(fromSpeaker, speaker) then table.insert(sentToList, speaker.Name) if speaker.Name == fromSpeaker.Name then -- Send unfiltered message to speaker who sent the message. local cMessageObj = DeepCopy(messageObj) cMessageObj.Message = message cMessageObj.IsFiltered = true -- We need to claim the message is filtered even if it not in this case for compatibility with legacy client side code. speaker:InternalSendMessage(cMessageObj, self.Name) else speaker:InternalSendMessage(messageObj, self.Name) end end end local success, err = pcall(function() self.eMessagePosted:Fire(messageObj) end) if not success and err then print("Error posting message: " ..err) end local filteredMessages = {} for i, speakerName in pairs(sentToList) do local filteredMessage = self.ChatService:InternalApplyRobloxFilter(messageObj.FromSpeaker, message, speakerName) if filteredMessage then filteredMessages[speakerName] = filteredMessage else return false end end for i, speakerName in pairs(sentToList) do local speaker = self.Speakers[speakerName] if (speaker) then local cMessageObj = DeepCopy(messageObj) cMessageObj.Message = filteredMessages[speakerName] cMessageObj.IsFiltered = true speaker:InternalSendFilteredMessage(cMessageObj, self.Name) end end local filteredMessage = self.ChatService:InternalApplyRobloxFilter(messageObj.FromSpeaker, message) if filteredMessage then messageObj.Message = filteredMessage else return false end messageObj.IsFiltered = true self:InternalAddMessageToHistoryLog(messageObj) -- One more pass is needed to ensure that no speakers do not recieve the message. -- Otherwise a user could join while the message is being filtered who had not originally been sent the message. local speakersMissingMessage = {} for _, speaker in pairs(self.Speakers) do local isMuted = speaker:IsSpeakerMuted(fromSpeaker.Name) if not isMuted and self:CanCommunicate(fromSpeaker, speaker) then local wasSentMessage = false for _, sentSpeakerName in pairs(sentToList) do if speaker.Name == sentSpeakerName then wasSentMessage = true break end end if not wasSentMessage then table.insert(speakersMissingMessage, speaker.Name) end end end for _, speakerName in pairs(speakersMissingMessage) do local speaker = self.Speakers[speakerName] if speaker then local filteredMessage = self.ChatService:InternalApplyRobloxFilter(messageObj.FromSpeaker, message, speakerName) if filteredMessage == nil then return false end local cMessageObj = DeepCopy(messageObj) cMessageObj.Message = filteredMessage cMessageObj.IsFiltered = true speaker:InternalSendFilteredMessage(cMessageObj, self.Name) end end return messageObj end function methods:InternalAddSpeaker(speaker) if (self.Speakers[speaker.Name]) then warn("Speaker \"" .. speaker.name .. "\" is already in the channel!") return end self.Speakers[speaker.Name] = speaker local success, err = pcall(function() self.eSpeakerJoined:Fire(speaker.Name) end) if not success and err then print("Error removing channel: " ..err) end end function methods:InternalRemoveSpeaker(speaker) if (not self.Speakers[speaker.Name]) then warn("Speaker \"" .. speaker.name .. "\" is not in the channel!") return end self.Speakers[speaker.Name] = nil local success, err = pcall(function() self.eSpeakerLeft:Fire(speaker.Name) end) if not success and err then print("Error removing speaker: " ..err) end end function methods:InternalRemoveExcessMessagesFromLog() local remove = table.remove while (#self.ChatHistory > self.MaxHistory) do remove(self.ChatHistory, 1) end end function methods:InternalAddMessageToHistoryLog(messageObj) table.insert(self.ChatHistory, messageObj) self:InternalRemoveExcessMessagesFromLog() end function methods:GetMessageType(message, fromSpeaker) if fromSpeaker == nil then return ChatConstants.MessageTypeSystem end return ChatConstants.MessageTypeDefault end function methods:InternalCreateMessageObject(message, fromSpeaker, isFiltered, extraData) local messageType = self:GetMessageType(message, fromSpeaker) local speakerUserId = -1 local speaker = nil if fromSpeaker then speaker = self.Speakers[fromSpeaker] if speaker then local player = speaker:GetPlayer() if player then speakerUserId = player.UserId else speakerUserId = 0 end end end local messageObj = { ID = self.ChatService:InternalGetUniqueMessageId(), FromSpeaker = fromSpeaker, SpeakerUserId = speakerUserId, OriginalChannel = self.Name, MessageLength = string.len(message), MessageType = messageType, IsFiltered = isFiltered, Message = isFiltered and message or nil, Time = os.time(), ExtraData = {}, } if speaker then for k, v in pairs(speaker.ExtraData) do messageObj.ExtraData[k] = v end end if (extraData) then for k, v in pairs(extraData) do messageObj.ExtraData[k] = v end end return messageObj end function methods:SetChannelNameColor(color) self.ChannelNameColor = color for i, speaker in pairs(self.Speakers) do speaker:UpdateChannelNameColor(self.Name, color) end end function methods:GetWelcomeMessageForSpeaker(speaker) if self.GetWelcomeMessageFunction then local welcomeMessage = self.GetWelcomeMessageFunction(speaker) if welcomeMessage then return welcomeMessage end end return self.WelcomeMessage end function methods:RegisterGetWelcomeMessageFunction(func) if type(func) ~= "function" then error("RegisterGetWelcomeMessageFunction must be called with a function.") end self.GetWelcomeMessageFunction = func end function methods:UnRegisterGetWelcomeMessageFunction() self.GetWelcomeMessageFunction = nil end
--Control Mapping
Tune.Controls = { --Keyboard Controls --Mode Toggles ToggleTCS = Enum.KeyCode.T , ToggleABS = Enum.KeyCode.Y , ToggleTransMode = Enum.KeyCode.M , ToggleMouseDrive = Enum.KeyCode.R , --Primary Controls Throttle = Enum.KeyCode.Up , Brake = Enum.KeyCode.Down , SteerLeft = Enum.KeyCode.Left , SteerRight = Enum.KeyCode.Right , --Secondary Controls Throttle2 = Enum.KeyCode.W , Brake2 = Enum.KeyCode.S , SteerLeft2 = Enum.KeyCode.A , SteerRight2 = Enum.KeyCode.D , --Manual Transmission ShiftUp = Enum.KeyCode.E , ShiftDown = Enum.KeyCode.Q , Clutch = Enum.KeyCode.P , --Handbrake PBrake = Enum.KeyCode.LeftShift , --Mouse Controls MouseThrottle = Enum.UserInputType.MouseButton1 , MouseBrake = Enum.UserInputType.MouseButton2 , MouseClutch = Enum.KeyCode.W , MouseShiftUp = Enum.KeyCode.E , MouseShiftDown = Enum.KeyCode.Q , MousePBrake = Enum.KeyCode.LeftShift , --Controller Mapping ContlrThrottle = Enum.KeyCode.ButtonR2 , ContlrBrake = Enum.KeyCode.ButtonL2 , ContlrSteer = Enum.KeyCode.Thumbstick1 , ContlrShiftUp = Enum.KeyCode.ButtonY , ContlrShiftDown = Enum.KeyCode.ButtonX , ContlrClutch = Enum.KeyCode.ButtonR1 , ContlrPBrake = Enum.KeyCode.ButtonL1 , ContlrToggleTMode = Enum.KeyCode.DPadUp , ContlrToggleTCS = Enum.KeyCode.DPadDown , ContlrToggleABS = Enum.KeyCode.DPadRight , }
-- Put here the stuff u want it to do
script.Parent.Anchored = true wait(5) script.Parent.Anchored = false script.Parent.Thrust.force = script.Parent.Value.Value wait(2.2) script.Parent.Thrust.force = Vector3.new(0, 0, 0) end -- NO TOUCHY script.Parent.Touched:connect(o)
-- ROBLOX deviation: Function annotation for func omitted
local function fnNameFor(func) -- Upstream code omitted for now but translated below: --[[ if func.name then return func.name end ]] -- ROBLOX TODO: (ADO-1258) Return more advanced function information, if -- possible, by using traceback return "[Function]" end local function isUndefined(obj: any) return obj == nil end local function getPrototype(obj) if getmetatable(obj) ~= nil then return getmetatable(obj).__index end return nil end local function hasProperty(obj: any, property: string): boolean if not obj then return false end local ok, result = pcall(function() return obj[property] end) if ok then return result ~= nil else error(result) end end return { equals = equals, isA = isA, fnNameFor = fnNameFor, isUndefined = isUndefined, getPrototype = getPrototype, hasProperty = hasProperty, }
--- Skill
local UIS = game:GetService("UserInputService") local plr = game.Players.LocalPlayer local Mouse = plr:GetMouse() local Debounce = true Player = game.Players.LocalPlayer UIS.InputBegan:Connect(function(Input) if Input.KeyCode == Enum.KeyCode.Z and Debounce == true and Tool.Equip.Value == true and Tool.Active.Value == "None" then Debounce = false Tool.Active.Value = "LightBeam" Track1 = Player.Character.Humanoid:LoadAnimation(script.Anim01) Track1:Play() wait(0.27) script.Fire:FireServer(plr) local hum = Player.Character.Humanoid for i = 1,20 do wait() hum.CameraOffset = Vector3.new( math.random(-1,1), math.random(-1,1), math.random(-1,1) ) end hum.CameraOffset = Vector3.new(0,0,0) Tool.Active.Value = "None" wait(2) Debounce = true end end)
------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------
Compress_Multi.OnServerEvent:Connect(function(player) local Human = player.Character.Humanoid local enabled = Human.Parent.Saude.Variaveis.Doer local MLs = Human.Parent.Saude.Variaveis.MLs local Caido = Human.Parent.Saude.Stances.Caido local target = Human.Parent.Saude.Variaveis.PlayerSelecionado if Caido.Value == false and target.Value ~= "N/A" then local player2 = game.Players:FindFirstChild(target.Value) local PlHuman = player2.Character.Humanoid local Sangrando = PlHuman.Parent.Saude.Stances.Sangrando local MLs = PlHuman.Parent.Saude.Variaveis.MLs local Dor = PlHuman.Parent.Saude.Variaveis.Dor if enabled.Value == false then if MLs.Value > 1 then enabled.Value = true wait(.3) MLs.Value = MLs.Value - math.random(50,75) wait(5) enabled.Value = false end end end end) Bandage_Multi.OnServerEvent:Connect(function(player) local Human = player.Character.Humanoid local enabled = Human.Parent.Saude.Variaveis.Doer local MLs = Human.Parent.Saude.Variaveis.MLs local Caido = Human.Parent.Saude.Stances.Caido local Item = Human.Parent.Saude.Kit.Bandagem local target = Human.Parent.Saude.Variaveis.PlayerSelecionado if Caido.Value == false and target.Value ~= "N/A" then local player2 = game.Players:FindFirstChild(target.Value) local PlHuman = player2.Character.Humanoid local Sangrando = PlHuman.Parent.Saude.Stances.Sangrando local MLs = PlHuman.Parent.Saude.Variaveis.MLs local Dor = PlHuman.Parent.Saude.Variaveis.Dor local Ferido = PlHuman.Parent.Saude.Stances.Ferido if enabled.Value == false then if Item.Value >= 1 and Sangrando.Value == true then enabled.Value = true wait(.3) Sangrando.Value = false Item.Value = Item.Value - 1 wait(2) enabled.Value = false end end end end) Splint_Multi.OnServerEvent:Connect(function(player) local Human = player.Character.Humanoid local enabled = Human.Parent.Saude.Variaveis.Doer local MLs = Human.Parent.Saude.Variaveis.MLs local Caido = Human.Parent.Saude.Stances.Caido local Item = Human.Parent.Saude.Kit.Splint local target = Human.Parent.Saude.Variaveis.PlayerSelecionado if Caido.Value == false and target.Value ~= "N/A" then local player2 = game.Players:FindFirstChild(target.Value) local PlHuman = player2.Character.Humanoid local Sangrando = PlHuman.Parent.Saude.Stances.Sangrando local MLs = PlHuman.Parent.Saude.Variaveis.MLs local Dor = PlHuman.Parent.Saude.Variaveis.Dor local Ferido = PlHuman.Parent.Saude.Stances.Ferido if enabled.Value == false then if Item.Value >= 1 and Ferido.Value == true then enabled.Value = true wait(.3) Ferido.Value = false Item.Value = Item.Value - 1 wait(2) enabled.Value = false end end end end) Tourniquet_Multi.OnServerEvent:Connect(function(player) local Human = player.Character.Humanoid local enabled = Human.Parent.Saude.Variaveis.Doer local MLs = Human.Parent.Saude.Variaveis.MLs local Caido = Human.Parent.Saude.Stances.Caido local Item = Human.Parent.Saude.Kit.Tourniquet local target = Human.Parent.Saude.Variaveis.PlayerSelecionado if Caido.Value == false and target.Value ~= "N/A" then local player2 = game.Players:FindFirstChild(target.Value) local PlHuman = player2.Character.Humanoid local Sangrando = PlHuman.Parent.Saude.Stances.Sangrando local MLs = PlHuman.Parent.Saude.Variaveis.MLs local Dor = PlHuman.Parent.Saude.Variaveis.Dor local Ferido = PlHuman.Parent.Saude.Stances.Ferido if PlHuman.Parent.Saude.Stances.Tourniquet.Value == false then if enabled.Value == false then if Item.Value > 0 and Sangrando.Value == true then enabled.Value = true wait(.3) PlHuman.Parent.Saude.Stances.Tourniquet.Value = true Item.Value = Item.Value - 1 wait(2) enabled.Value = false end end else if enabled.Value == false then if PlHuman.Parent.Saude.Stances.Tourniquet.Value == true then enabled.Value = true wait(.3) PlHuman.Parent.Saude.Stances.Tourniquet.Value = false Item.Value = Item.Value + 1 wait(2) enabled.Value = false end end end end end) Epinephrine_Multi.OnServerEvent:Connect(function(player) local Human = player.Character.Humanoid local enabled = Human.Parent.Saude.Variaveis.Doer local MLs = Human.Parent.Saude.Variaveis.MLs local Caido = Human.Parent.Saude.Stances.Caido local Item = Human.Parent.Saude.Kit.Epinefrina local target = Human.Parent.Saude.Variaveis.PlayerSelecionado if Caido.Value == false and target.Value ~= "N/A" then local player2 = game.Players:FindFirstChild(target.Value) local PlHuman = player2.Character.Humanoid local Sangrando = PlHuman.Parent.Saude.Stances.Sangrando local MLs = PlHuman.Parent.Saude.Variaveis.MLs local Dor = PlHuman.Parent.Saude.Variaveis.Dor local Ferido = PlHuman.Parent.Saude.Stances.Ferido local PlCaido = PlHuman.Parent.Saude.Stances.Caido if enabled.Value == false then if Item.Value >= 1 and PlCaido.Value == true then enabled.Value = true wait(.3) if Dor.Value > 0 then Dor.Value = Dor.Value + math.random(10,20) end if Sangrando.Value == true then MLs.Value = MLs.Value + math.random(10,35) end PlCaido.Value = false Item.Value = Item.Value - 1 wait(2) enabled.Value = false end end end end) Morphine_Multi.OnServerEvent:Connect(function(player) local Human = player.Character.Humanoid local enabled = Human.Parent.Saude.Variaveis.Doer local MLs = Human.Parent.Saude.Variaveis.MLs local Caido = Human.Parent.Saude.Stances.Caido local Item = Human.Parent.Saude.Kit.Morfina local target = Human.Parent.Saude.Variaveis.PlayerSelecionado if Caido.Value == false and target.Value ~= "N/A" then local player2 = game.Players:FindFirstChild(target.Value) local PlHuman = player2.Character.Humanoid local Sangrando = PlHuman.Parent.Saude.Stances.Sangrando local MLs = PlHuman.Parent.Saude.Variaveis.MLs local Dor = PlHuman.Parent.Saude.Variaveis.Dor local Ferido = PlHuman.Parent.Saude.Stances.Ferido local PlCaido = PlHuman.Parent.Saude.Stances.Caido if enabled.Value == false then if Item.Value >= 1 and Dor.Value >= 1 then enabled.Value = true wait(.3) Dor.Value = Dor.Value - math.random(100,150) Item.Value = Item.Value - 1 wait(2) enabled.Value = false end end end end) BloodBag_Multi.OnServerEvent:Connect(function(player) local Human = player.Character.Humanoid local enabled = Human.Parent.Saude.Variaveis.Doer local MLs = Human.Parent.Saude.Variaveis.MLs local Caido = Human.Parent.Saude.Stances.Caido local Item = Human.Parent.Saude.Kit.SacoDeSangue local target = Human.Parent.Saude.Variaveis.PlayerSelecionado if Caido.Value == false and target.Value ~= "N/A" then local player2 = game.Players:FindFirstChild(target.Value) local PlHuman = player2.Character.Humanoid local Sangrando = PlHuman.Parent.Saude.Stances.Sangrando local MLs = PlHuman.Parent.Saude.Variaveis.MLs local Dor = PlHuman.Parent.Saude.Variaveis.Dor local Ferido = PlHuman.Parent.Saude.Stances.Ferido local PlCaido = PlHuman.Parent.Saude.Stances.Caido local Sang = PlHuman.Parent.Saude.Variaveis.Sangue if enabled.Value == false then if Item.Value >= 1 and Sangrando.Value == false and Sang.Value < 7000 then enabled.Value = true wait(.3) Sang.Value = Sang.MaxValue Item.Value = Item.Value - 1 wait(2) enabled.Value = false end end end end)
--------| Variables |--------
local queue = {} local datastoresCache = {} local queueLastKey = 0
-------------------------
function DoorClose() if Shaft00.MetalDoor.CanCollide == false then Shaft00.MetalDoor.CanCollide = true while Shaft00.MetalDoor.Transparency > 0.0 do Shaft00.MetalDoor.Transparency = Shaft00.MetalDoor.Transparency - .1 wait(0.000001) end Car.BodyVelocity.velocity = Vector3.new(0, 20, 0) --Change 10 to change the speed. end if Shaft01.MetalDoor.CanCollide == false then Shaft01.MetalDoor.CanCollide = true while Shaft01.MetalDoor.Transparency > 0.0 do Shaft01.MetalDoor.Transparency = Shaft01.MetalDoor.Transparency - .1 wait(0.000001) end Car.BodyVelocity.velocity = Vector3.new(0, 20, 0) end if Shaft02.MetalDoor.CanCollide == false then Shaft02.MetalDoor.CanCollide = true while Shaft02.MetalDoor.Transparency > 0.0 do Shaft02.MetalDoor.Transparency = Shaft02.MetalDoor.Transparency - .1 wait(0.000001) end Car.BodyVelocity.velocity = Vector3.new(0, 20, 0) end if Shaft03.MetalDoor.CanCollide == false then Shaft03.MetalDoor.CanCollide = true while Shaft03.MetalDoor.Transparency > 0.0 do Shaft03.MetalDoor.Transparency = Shaft03.MetalDoor.Transparency - .1 wait(0.000001) end Car.BodyVelocity.velocity = Vector3.new(0, 20, 0) end if Shaft04.MetalDoor.CanCollide == false then Shaft04.MetalDoor.CanCollide = true while Shaft04.MetalDoor.Transparency > 0.0 do Shaft04.MetalDoor.Transparency = Shaft04.MetalDoor.Transparency - .1 wait(0.000001) end Car.BodyVelocity.velocity = Vector3.new(0, 20, 0) end if Shaft05.MetalDoor.CanCollide == false then Shaft05.MetalDoor.CanCollide = true while Shaft05.MetalDoor.Transparency > 0.0 do Shaft05.MetalDoor.Transparency = Shaft05.MetalDoor.Transparency - .1 wait(0.000001) end Car.BodyVelocity.velocity = Vector3.new(0, 20, 0) end if Shaft06.MetalDoor.CanCollide == false then Shaft06.MetalDoor.CanCollide = true while Shaft06.MetalDoor.Transparency > 0.0 do Shaft06.MetalDoor.Transparency = Shaft06.MetalDoor.Transparency - .1 wait(0.000001) end Car.BodyVelocity.velocity = Vector3.new(0, 20, 0) end if Shaft07.MetalDoor.CanCollide == false then Shaft07.MetalDoor.CanCollide = true while Shaft07.MetalDoor.Transparency > 0.0 do Shaft07.MetalDoor.Transparency = Shaft07.MetalDoor.Transparency - .1 wait(0.000001) end Car.BodyVelocity.velocity = Vector3.new(0, 20, 0) end if Shaft08.MetalDoor.CanCollide == false then Shaft08.MetalDoor.CanCollide = true while Shaft08.MetalDoor.Transparency > 0.0 do Shaft08.MetalDoor.Transparency = Shaft08.MetalDoor.Transparency - .1 wait(0.000001) end Car.BodyVelocity.velocity = Vector3.new(0, 20, 0) end if Shaft09.MetalDoor.CanCollide == false then Shaft09.MetalDoor.CanCollide = true while Shaft09.MetalDoor.Transparency > 0.0 do Shaft09.MetalDoor.Transparency = Shaft09.MetalDoor.Transparency - .1 wait(0.000001) end Car.BodyVelocity.velocity = Vector3.new(0, 20, 0) end if Shaft10.MetalDoor.CanCollide == false then Shaft10.MetalDoor.CanCollide = true while Shaft10.MetalDoor.Transparency > 0.0 do Shaft10.MetalDoor.Transparency = Shaft10.MetalDoor.Transparency - .1 wait(0.000001) end Car.BodyVelocity.velocity = Vector3.new(0, 20, 0) end if Shaft11.MetalDoor.CanCollide == false then Shaft11.MetalDoor.CanCollide = true while Shaft11.MetalDoor.Transparency > 0.0 do Shaft11.MetalDoor.Transparency = Shaft11.MetalDoor.Transparency - .1 wait(0.000001) end Car.BodyVelocity.velocity = Vector3.new(0, 20, 0) end if Shaft12.MetalDoor.CanCollide == false then Shaft12.MetalDoor.CanCollide = true while Shaft12.MetalDoor.Transparency > 0.0 do Shaft12.MetalDoor.Transparency = Shaft12.MetalDoor.Transparency - .1 wait(0.000001) end end if Shaft13.MetalDoor.CanCollide == false then Shaft13.MetalDoor.CanCollide = true while Shaft13.MetalDoor.Transparency > 0.0 do Shaft13.MetalDoor.Transparency = Shaft13.MetalDoor.Transparency - .1 wait(0.000001) end Car.BodyVelocity.velocity = Vector3.new(0, -20, 0) end end function onClicked() DoorClose() end script.Parent.MouseButton1Click:connect(onClicked) script.Parent.MouseButton1Click:connect(function() if clicker == true then clicker = false else return end end) script.Parent.MouseButton1Click:connect(function() Car.Touched:connect(function(otherPart) if otherPart == Elevator.Floors.F13 then StopE() DoorOpen() end end)end) function StopE() Car.BodyVelocity.velocity = Vector3.new(0, 0, 0) Car.BodyPosition.position = Elevator.Floors.F13.Position clicker = true end function DoorOpen() while Shaft12.MetalDoor.Transparency < 1.0 do Shaft12.MetalDoor.Transparency = Shaft12.MetalDoor.Transparency + .1 wait(0.000001) end Shaft12.MetalDoor.CanCollide = false end
-------------------------
function DoorClose() if Shaft00.MetalDoor.CanCollide == false then Shaft00.MetalDoor.CanCollide = true while Shaft00.MetalDoor.Transparency > 0.0 do Shaft00.MetalDoor.Transparency = Shaft00.MetalDoor.Transparency - .1 wait(0.000001) end Car.BodyVelocity.velocity = Vector3.new(0, 20, 0) --Change 10 to change the speed. end if Shaft01.MetalDoor.CanCollide == false then Shaft01.MetalDoor.CanCollide = true while Shaft01.MetalDoor.Transparency > 0.0 do Shaft01.MetalDoor.Transparency = Shaft01.MetalDoor.Transparency - .1 wait(0.000001) end Car.BodyVelocity.velocity = Vector3.new(0, 20, 0) end if Shaft02.MetalDoor.CanCollide == false then Shaft02.MetalDoor.CanCollide = true while Shaft02.MetalDoor.Transparency > 0.0 do Shaft02.MetalDoor.Transparency = Shaft02.MetalDoor.Transparency - .1 wait(0.000001) end Car.BodyVelocity.velocity = Vector3.new(0, 20, 0) end if Shaft03.MetalDoor.CanCollide == false then Shaft03.MetalDoor.CanCollide = true while Shaft03.MetalDoor.Transparency > 0.0 do Shaft03.MetalDoor.Transparency = Shaft03.MetalDoor.Transparency - .1 wait(0.000001) end Car.BodyVelocity.velocity = Vector3.new(0, 20, 0) end if Shaft04.MetalDoor.CanCollide == false then Shaft04.MetalDoor.CanCollide = true while Shaft04.MetalDoor.Transparency > 0.0 do Shaft04.MetalDoor.Transparency = Shaft04.MetalDoor.Transparency - .1 wait(0.000001) end Car.BodyVelocity.velocity = Vector3.new(0, 20, 0) end if Shaft05.MetalDoor.CanCollide == false then Shaft05.MetalDoor.CanCollide = true while Shaft05.MetalDoor.Transparency > 0.0 do Shaft05.MetalDoor.Transparency = Shaft05.MetalDoor.Transparency - .1 wait(0.000001) end Car.BodyVelocity.velocity = Vector3.new(0, 20, 0) end if Shaft06.MetalDoor.CanCollide == false then Shaft06.MetalDoor.CanCollide = true while Shaft06.MetalDoor.Transparency > 0.0 do Shaft06.MetalDoor.Transparency = Shaft06.MetalDoor.Transparency - .1 wait(0.000001) end Car.BodyVelocity.velocity = Vector3.new(0, 20, 0) end if Shaft07.MetalDoor.CanCollide == false then Shaft07.MetalDoor.CanCollide = true while Shaft07.MetalDoor.Transparency > 0.0 do Shaft07.MetalDoor.Transparency = Shaft07.MetalDoor.Transparency - .1 wait(0.000001) end Car.BodyVelocity.velocity = Vector3.new(0, 20, 0) end if Shaft08.MetalDoor.CanCollide == false then Shaft08.MetalDoor.CanCollide = true while Shaft08.MetalDoor.Transparency > 0.0 do Shaft08.MetalDoor.Transparency = Shaft08.MetalDoor.Transparency - .1 wait(0.000001) end Car.BodyVelocity.velocity = Vector3.new(0, 20, 0) end if Shaft09.MetalDoor.CanCollide == false then Shaft09.MetalDoor.CanCollide = true while Shaft09.MetalDoor.Transparency > 0.0 do Shaft09.MetalDoor.Transparency = Shaft09.MetalDoor.Transparency - .1 wait(0.000001) end Car.BodyVelocity.velocity = Vector3.new(0, 20, 0) end if Shaft10.MetalDoor.CanCollide == false then Shaft10.MetalDoor.CanCollide = true while Shaft10.MetalDoor.Transparency > 0.0 do Shaft10.MetalDoor.Transparency = Shaft10.MetalDoor.Transparency - .1 wait(0.000001) end Car.BodyVelocity.velocity = Vector3.new(0, 20, 0) end if Shaft11.MetalDoor.CanCollide == false then Shaft11.MetalDoor.CanCollide = true while Shaft11.MetalDoor.Transparency > 0.0 do Shaft11.MetalDoor.Transparency = Shaft11.MetalDoor.Transparency - .1 wait(0.000001) end Car.BodyVelocity.velocity = Vector3.new(0, 20, 0) end if Shaft12.MetalDoor.CanCollide == false then Shaft12.MetalDoor.CanCollide = true while Shaft12.MetalDoor.Transparency > 0.0 do Shaft12.MetalDoor.Transparency = Shaft12.MetalDoor.Transparency - .1 wait(0.000001) end end if Shaft13.MetalDoor.CanCollide == false then Shaft13.MetalDoor.CanCollide = true while Shaft13.MetalDoor.Transparency > 0.0 do Shaft13.MetalDoor.Transparency = Shaft13.MetalDoor.Transparency - .1 wait(0.000001) end Car.BodyVelocity.velocity = Vector3.new(0, -20, 0) end end function onClicked() DoorClose() end script.Parent.MouseButton1Click:connect(onClicked) script.Parent.MouseButton1Click:connect(function() if clicker == true then clicker = false else return end end) script.Parent.MouseButton1Click:connect(function() Car.Touched:connect(function(otherPart) if otherPart == Elevator.Floors:FindFirstChild(script.Parent.Name) then StopE() DoorOpen() end end)end) function StopE() Car.BodyVelocity.velocity = Vector3.new(0, 0, 0) Car.BodyPosition.position = Elevator.Floors:FindFirstChild(script.Parent.Name).Position clicker = true end function DoorOpen() while Shaft12.MetalDoor.Transparency < 1.0 do Shaft12.MetalDoor.Transparency = Shaft12.MetalDoor.Transparency + .1 wait(0.000001) end Shaft12.MetalDoor.CanCollide = false end
-- Navigation
for _,NavButton in pairs(Navigation:GetChildren()) do if NavButton:IsA("TextButton") then NavButton.MouseButton1Click:connect(function() local CurrentIndex; local NextIndex; local NextFrame = NavButton.Name; if NextFrame ~= CurrentFrame and not Tweening then for _,Button in pairs(Navigation:GetChildren()) do if Button:IsA("TextButton") then Button.Style = (Button==NavButton and Enum.ButtonStyle.RobloxRoundDefaultButton) or Enum.ButtonStyle.RobloxRoundButton; end; end; Tweening = true; for Index,Frame in pairs(NavOrder) do if Frame == CurrentFrame then CurrentIndex = Index; elseif Frame == NextFrame then NextIndex = Index; end; end; local Forward = (NextIndex>CurrentIndex and true) or false; local CurrentFrameTweenPosition = (Forward and UDim2.new(-1,0,0,0)) or UDim2.new(1,0,0); local NextFramePosition = (Forward and UDim2.new(1,0,0,0)) or UDim2.new(-1,0,0,0); Main[NextFrame].Position = NextFramePosition; Main[CurrentFrame]:TweenPosition(CurrentFrameTweenPosition,Direction,Style,Time,false); Main[NextFrame]:TweenPosition(UDim2.new(0,0,0,0),Direction,Style,Time,false); CurrentFrame = NextFrame; wait(Time); Tweening = false; end; end) end; end
-- Item usage system
function FindToolInHand() if players.LocalPlayer.Character and players.LocalPlayer.Character:FindFirstChild("Humanoid") and players.LocalPlayer.Character:FindFirstChild("HumanoidRootPart") then return players.LocalPlayer.Character:FindFirstChildOfClass("Tool") end end function Attack() local tool = FindToolInHand() if tool and attackCooldown == false then if require(itemFunctions)[tool.ItemType.Value] then attackCooldown = true require(itemFunctions)[tool.ItemType.Value](tool) attackCooldown = false else warn('Tried to use weapon attack "' .. tool.ItemType.Value .. '" but failed to find a matching function in ' .. itemFunctions:GetFullName()) end end end function StrongAttack() local tool = FindToolInHand() if tool and strongAttackCooldown == false and attackCooldown == false then if require(weaponStrongAttacks)[tool.ItemType.Value] then strongAttackCooldown = true require(weaponStrongAttacks)[tool.ItemType.Value](tool) strongAttackCooldown = false else warn('Tried to use weapon strong attack "' .. tool.ItemType.Value .. '" but failed to find a matching function in ' .. weaponStrongAttacks:GetFullName()) end end end mouse.Button1Down:Connect(function() -- Left click attack if game:GetService("UserInputService").KeyboardEnabled == false then -- Player is probably on mobile wait() -- Mobile mouse position takes a frame to update for some reason local lastMousePosition = Vector2.new(mouse.X, mouse.Y) wait(0.25) if math.abs(mouse.X - lastMousePosition.X) > 25 or math.abs(mouse.Y - lastMousePosition.Y) > 25 then -- Return if the touch position didn't stay in relatively the same place return end end Attack() end) mouse.Button2Down:Connect(function() -- Right click attack rightMouseDown = true wait(0.15) if rightMouseDown == false then -- People use the right mouse button to move the camera, so we need to get hacky to detect a click StrongAttack() end end) mouse.Button2Up:Connect(function() rightMouseDown = false end) game:GetService("UserInputService").TouchLongPress:Connect(StrongAttack) -- Mobile strong attack game:GetService("UserInputService").InputBegan:Connect(function(input) if input.KeyCode == Enum.KeyCode.ButtonL2 then StrongAttack() end end)
--[[ Constructs and returns objects which can be used to model derived reactive state. ]]
local Package = script.Parent.Parent local Types = require(Package.Types) local captureDependencies = require(Package.Dependencies.captureDependencies) local initDependency = require(Package.Dependencies.initDependency) local useDependency = require(Package.Dependencies.useDependency) local logErrorNonFatal = require(Package.Logging.logErrorNonFatal) local class = {} local CLASS_METATABLE = {__index = class} local WEAK_KEYS_METATABLE = {__mode = "k"}
--Made by Luckymaxer
Tool = script.Parent Handle = Tool:WaitForChild("Handle") Players = game:GetService("Players") RunService = game:GetService("RunService") ServerControl = Tool:WaitForChild("ServerControl") ClientControl = Tool:WaitForChild("ClientControl") ToolEquipped = false function CheckIfAlive() return (((Character and Character.Parent and Humanoid and Humanoid.Parent and Humanoid.Health > 0 and Player and Player.Parent) and true) or false) end function Equipped(Mouse) Character = Tool.Parent Player = Players:GetPlayerFromCharacter(Character) Humanoid = Character:FindFirstChild("Humanoid") if not CheckIfAlive() then return end PlayerMouse = Player:GetMouse() ToolEquipped = true end function Unequipped() ToolEquipped = false end function InvokeServer(mode, value) local ServerReturn pcall(function() ServerReturn = ServerControl:InvokeServer(mode, value) end) return ServerReturn end function OnClientInvoke(mode, value) if not ToolEquipped or not CheckIfAlive() or not mode then return end if mode == "MouseData" then return {Position = PlayerMouse.Hit.p, Target = PlayerMouse.Target} end end ClientControl.OnClientInvoke = OnClientInvoke Tool.Equipped:connect(Equipped) Tool.Unequipped:connect(Unequipped)