prompt
stringlengths
2
14.7k
completion
stringlengths
1
99.7k
--Put this in a r15 model character or it wont work.
--------------------) Settings
Damage = 0 -- the ammout of health the player or mob will take Cooldown = 15 -- cooldown for use of the tool again ZoneModelName = "Bullet hell" -- name the zone model MobHumanoidName = "Humanoid"-- the name of player or mob u want to damage
-- Functions --
local function playSoundLocal(sId,sParent) local sound = Instance.new("Sound",sParent) sound.SoundId = "http://www.roblox.com/asset/?id="..sId sound:Play() sound:Destroy() end local function onClicked(player) print(player.Name.." clicked on Uniform Giver") playSoundLocal(152206246,player) -- Declaring the sound ID and Parent local foundShirt = player.Character:FindFirstChild("Shirt") -- Tries to find Shirt if not foundShirt then -- if there is no shirt print("No shirt found, creating for "..player.Name) local newShirt = Instance.new("Shirt",player.Character) newShirt.Name = "Shirt" else if foundShirt then -- if there is a shirt print("Shirt found, reconstructing for "..player.Name) player.Character.Shirt:remove() local newShirt = Instance.new("Shirt",player.Character) newShirt.Name = "Shirt" end end local foundPants = player.Character:FindFirstChild("Pants") -- Tries to find Pants if not foundPants then -- if there are no pants print("No pants found, creating for "..player.Name) local newPants = Instance.new("Pants",player.Character) newPants.Name = "Pants" else if foundPants then -- if there are pants print("Pants found, reconstructing for "..player.Name) player.Character.Pants:remove() local newPants = Instance.new("Pants",player.Character) newPants.Name = "Pants" end end player.Character.Shirt.ShirtTemplate = shirtId player.Character.Pants.PantsTemplate = pantsId end local function onHoverEnter(player) cPart.Transparency = 1 cPart.BrickColor = BrickColor.White() end local function onHoverLeave(player) cPart.BrickColor = BrickColor.Gray() cPart.Transparency = 1 end
--DO NOT CHANGE ANYTHING INSIDE OF THIS SCRIPT BESIDES WHAT YOU ARE TOLD TO UNLESS YOU KNOW WHAT YOU'RE DOING OR THE SCRIPT WILL NOT WORK!!
local hitPart = script.Parent local debounce = true local tool = game.ServerStorage.BallonBow
-- Get services
local players = game:GetService("Players") local soundService = game:GetService("SoundService")
--[=[ Cleans up the service bag and all services that have been initialized in the service bag. ]=]
function ServiceBag:Destroy() local super = getmetatable(ServiceBag) self._destroying:Fire() local services = self._services local key, service = next(services) while service ~= nil do services[key] = nil if not (self._serviceTypesToInitializeSet and self._serviceTypesToInitializeSet[key]) then task.spawn(function() if service.Destroy then service:Destroy() end end) end key, service = next(services) end super.Destroy(self) end return ServiceBag
-- Globals
local AUTOSAVE_INTERVAL = 300 -- 5 minutes
-- Mount the ProfileCard to the playerGui
Roact.mount( Roact.createElement(ConfigContext.ConfigurationProvider, { config = ProfileCardConfiguration, }, { ProfileCard = Roact.createElement(ProfileCard, { adornee = HumanoidRootPart, controls = controls, }), }), playerGui, "MountedProfileCard" )
--Thank U!
game.Players.PlayerAdded:connect(function(plr) plr.CharacterAdded:connect(function(char) local a = Instance.new("PointLight", char.Head) a.Range = 17 --Replace 15 with how far you want the glow to be (15 is probably the best) a.Brightness = .9 --Replace 2 with how bright you want it to be (2 is probably the best) a.Color = Color3.new(255, 255, 255) --Set the color you want it to be (Red, Green, Blue, value divided by 255)(right now it is set to white which is probably the best) a.Shadows = true --Do you want the light to be seen through bricks? (true is probably, well, the best! ;) end) end)
--[=[ Creates an immediately rejected Promise with the given value. :::caution Something needs to consume this rejection (i.e. `:catch()` it), otherwise it will emit an unhandled Promise rejection warning on the next frame. Thus, you should not create and store rejected Promises for later use. Only create them on-demand as needed. ::: @param ... any @return Promise<...any> ]=]
function Promise.reject(...) local length, values = pack(...) return Promise._new(debug.traceback(nil, 2), function(_, reject) reject(unpack(values, 1, length)) end) end
-- Map name
local MAP_CONTAINER_NAME = "Arena" local MAP_NAME = "Map"
--edit the function below to return true when you want this response/prompt to be valid --player is the player speaking to the dialogue, and dialogueFolder is the object containing the dialogue data
return function(player, dialogueFolder) local plrData = require(game.ReplicatedStorage.Source.Modules.Util):GetPlayerData(player) return (plrData.Character.NPCSpecifics.GaveGriefToArtie.Value == false) and (plrData.Character.NPCSpecifics.GaveFoodToArtie.Value == false) end
-- Important note: Precision checks currently only for 'players' and the 'localplayer', not 'parts'.
--[[---------------- MODULES -----------------]]
-- local CIHModule = repStoreService.Game.Modules.ClientInteractionHandler local interactables = CIHModule.Interactables local CIH = require(CIHModule) local BMM = require(repStoreService.Game.Modules.BuildsManagerModule)
--[[ Returns true if the current state can transition to specified stateName, otherwise returns false. ]]
function StateHolder:canTransition(stateName) if not self._allowedTransitions[stateName] then Logger.error("State", stateName, "does not exist!") return false end for _, transitionState in pairs(self._allowedTransitions[self.current]) do if transitionState == stateName then return true end end return false end return StateHolder
-- Load all services within 'Services':
Knit.AddServicesDeep(script.Parent.Services)
--[[ ___ _______ _ _______ / _ |____/ ___/ / ___ ____ ___ (_)__ /__ __/ / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-< / / /_/ |_| \___/_//_/\_,_/___/___/_/___/ /_/ SecondLogic @ Inspare Avxnturador @ Novena ]]
local FE = workspace.FilteringEnabled local car = script.Parent.Car.Value local handler = car:WaitForChild("AC6_FE_Sounds") local _Tune = require(car["A-Chassis Tune"]) local BOVact = 0 local BOVact2 = 0 local BOV_Loudness = 7 --volume of the BOV (not exact volume so you kinda have to experiment with it) local BOV_Pitch = 1 --max pitch of the BOV (not exact so might have to mess with it) local TurboLoudness = 3 --volume of the Turbo (not exact volume so you kinda have to experiment with it also) script:WaitForChild("Whistle") script:WaitForChild("BOV") for i,v in pairs(car.DriveSeat:GetChildren()) do for _,a in pairs(script:GetChildren()) do if v.Name==a.Name then v:Stop() wait() v:Destroy() end end end car.DriveSeat.ChildRemoved:connect(function(child) if child.Name=="SeatWeld" then for i,v in pairs(car.DriveSeat:GetChildren()) do for _,a in pairs(script:GetChildren()) do if v.Name==a.Name then v:Stop() wait() v:Destroy() end end end end end) handler:FireServer("newSound","Whistle",car.DriveSeat,script.Whistle.SoundId,0,script.Whistle.Volume,true) handler:FireServer("newSound","BOV",car.DriveSeat,script.BOV.SoundId,0,script.BOV.Volume,true) handler:FireServer("playSound","Whistle") car.DriveSeat:WaitForChild("Whistle") car.DriveSeat:WaitForChild("BOV") local ticc = tick() local _TCount = 0 if _Tune.Aspiration == "Single" then _TCount = 1 elseif _Tune.Aspiration == "Double" then _TCount = 2 end while wait() do local psi = (((script.Parent.Values.Boost.Value)/(_Tune.Boost*_TCount))*2) BOVact = math.floor(psi*20) WP = (psi) WV = (psi/4)*TurboLoudness BP = (1-(-psi/20))*BOV_Pitch BV = (((-0.5+((psi/2)*BOV_Loudness)))*(1 - script.Parent.Values.Throttle.Value)) if BOVact < BOVact2 then if car.DriveSeat.BOV.IsPaused then if FE then handler:FireServer("playSound","BOV") else car.DriveSeat.BOV:Play() end end end if BOVact >= BOVact2 then if FE then handler:FireServer("stopSound","BOV") else car.DriveSeat.BOV:Stop() end end if FE then handler:FireServer("updateSound","Whistle",script.Whistle.SoundId,WP,WV) handler:FireServer("updateSound","BOV",script.BOV.SoundId,BP,BV) else car.DriveSeat.Whistle.Pitch = WP car.DriveSeat.Whistle.Volume = WV car.DriveSeat.BOV.Pitch = BP car.DriveSeat.BOV.Volume = BV end if (tick()-ticc) >= 0.1 then BOVact2 = math.floor(psi*20) ticc = tick() end end
-- Double check that we are being called from the client...
isClient = (game.Players.LocalPlayer ~= nil) if not isClient then error("ERROR: '"..script:GetFullName().."' can only be used from a LocalScript.") end
-- VALUES --
local Holding = Player:WaitForChild("Holding") local isBlocking = Player:WaitForChild("isBlocking") local Equipped = false local isHolding = false
-- Door --
local Model = script:FindFirstAncestorOfClass("Model") local DoorLogo = Model.Door.DoorLogo local DoorSegment = Model.Door.DoorSegment
--[[ Modules ]]
-- local ClickToMoveTouchControls = nil local ControlModules = {} local ControlState = {} ControlState.Current = nil function ControlState:SwitchTo(newControl) if ControlState.Current == newControl then return end if ControlState.Current then ControlState.Current:Disable() end ControlState.Current = newControl if ControlState.Current then ControlState.Current:Enable() end end function ControlState:IsTouchJumpModuleUsed() return isJumpEnabled end local MasterControl = require(script:WaitForChild('MasterControl'))
--[[Transmission]]
Tune.TransModes = {"Semi","Auto"} --[[ [Modes] "Auto" : Automatic shifting "Semi" : Clutchless manual shifting, dual clutch transmission "Manual" : Manual shifting with clutch >Include within brackets eg: {"Semi"} or {"Auto", "Manual"} >First mode is default mode ]] --Automatic Settings Tune.AutoShiftMode = "Speed" --[[ [Modes] "Speed" : Shifts based on wheel speed "RPM" : Shifts based on RPM ]] Tune.AutoUpThresh = -200 --Automatic upshift point (relative to peak RPM, positive = Over-rev) Tune.AutoDownThresh = 1400 --Automatic downshift point (relative to peak RPM, positive = Under-rev) --Gear Ratios Tune.FinalDrive = 4.60 -- [TRANSMISSION CALCULATIONS FOR NERDS] Tune.Ratios = { -- SPEED [SPS] = (Wheel diameter(studs) * pi(3.14) * RPM) / (60 * Gear Ratio * Final Drive * Multiplier) --[[Reverse]] 3.484 ,-- WHEEL TORQUE = Engine Torque * Gear Ratio * Final Drive * Multiplier --[[Neutral]] 0 , --[[ 1 ]] 3.000 , --[[ 2 ]] 2.022 , --[[ 3 ]] 1.384 , --[[ 4 ]] 1.000 , --[[ 5 ]] 0.861 , --[[ 6 ]] 0.500 , --[[ 7 ]] 0.320 , } Tune.FDMult = 1.7 -- Ratio multiplier (Change this value instead of FinalDrive if car is struggling with torque ; Default = 1)
--First build your Gun, make sure all the parts and Non-Colliding and Not Anchored. --Second put these parts inside the Tool (Call one of the parts 'Handle' and the rest 'Part' --Lastly, make/get your gun script and test it out!
local prev local parts = script.Parent.PTorso:GetChildren() for i = 1,#parts do if (parts[i].className == "Part") or (parts[i].className == "VehicleSeat") then if (prev ~= nil)then local weld = Instance.new("Weld") weld.Part0 = prev weld.Part1 = parts[i] weld.C0 = prev.CFrame:inverse() weld.C1 = parts[i].CFrame:inverse() weld.Parent = prev end prev = parts[i] end end
-------------------------------------Gun info
ToolName="Magnum" ClipSize=12 ReloadTime=1 Firerate=.2 MinSpread=0.000001 MaxSpread=0.00001 SpreadRate=0 BaseDamage=50 automatic=false burst=false shot=false --Shotgun BarrlePos=Vector3.new(0,0,0) Cursors={"rbxasset://textures\\GunCursor.png"} ReloadCursor="rbxasset://textures\\GunWaitCursor.png"
-- if #all_height > 0 then -- local avg -- local sum = 0 -- for i=1,#all_height do -- local _height = all_height[i] -- sum = sum + _height -- end -- avg = sum / #all_height -- height = avg -- end
return height end function Pets.Update() if Pets.Pet and Pets.Pet.Instance then local instance = Pets.Pet.Instance if Player.Character and Player.Character.PrimaryPart and Player.PetAttachment then local pet_type_data = PetData[Pets.Pet.Data.referenceModel] if pet_type_data and instance.PrimaryPart then local char_cf = Player.Character.PrimaryPart.CFrame local pet_cf = instance.PrimaryPart.CFrame local height = Pets:GetHeight(char_cf, instance) or pet_type_data.Offset.p.Y local new_cf = pet_type_data.Offset - Vector3.new(0,pet_type_data.Offset.p.Y,0) + Vector3.new(0,height,0)--char_cf:ToWorldSpace(pet_type_data.Offset - Vector3.new(0,pet_type_data.Offset.p.Y,0) + Vector3.new(0,height,0)) Player.PetAttachment.CFrame = new_cf end end end end Services.RunService.Heartbeat:Connect(Pets.Update) return Pets
-- Components will only work on instances parented under these descendants:
local DESCENDANT_WHITELIST = {workspace, Players} local Component = {} Component.__index = Component local componentsByTag = {} local function FastRemove(tbl, i) local n = #tbl tbl[i] = tbl[n] tbl[n] = nil end local function IsDescendantOfWhitelist(instance) for _,v in ipairs(DESCENDANT_WHITELIST) do if (instance:IsDescendantOf(v)) then return true end end return false end function Component.FromTag(tag) return componentsByTag[tag] end function Component.Auto(folder) local function Setup(moduleScript) local m = require(moduleScript) assert(type(m) == "table", "Expected table for component") assert(type(m.Tag) == "string", "Expected .Tag property") Component.new(m.Tag, m, m.RenderPriority) end for _,v in ipairs(folder:GetDescendants()) do if (v:IsA("ModuleScript")) then Setup(v) end end folder.DescendantAdded:Connect(function(v) if (v:IsA("ModuleScript")) then Setup(v) end end) end function Component.new(tag, class, renderPriority) assert(type(tag) == "string", "Argument #1 (tag) should be a string; got " .. type(tag)) assert(type(class) == "table", "Argument #2 (class) should be a table; got " .. type(class)) assert(type(class.new) == "function", "Class must contain a .new constructor function") assert(type(class.Destroy) == "function", "Class must contain a :Destroy function") assert(componentsByTag[tag] == nil, "Component already bound to this tag") local self = setmetatable({}, Component) self.Added = Signal.new() self.Removed = Signal.new() self._maid = Maid.new() self._lifecycleMaid = Maid.new() self._tag = tag self._class = class self._objects = {} self._instancesToObjects = {} self._hasHeartbeatUpdate = (type(class.HeartbeatUpdate) == "function") self._hasSteppedUpdate = (type(class.SteppedUpdate) == "function") self._hasRenderUpdate = (type(class.RenderUpdate) == "function") self._hasInit = (type(class.Init) == "function") self._hasDeinit = (type(class.Deinit) == "function") self._renderPriority = renderPriority or Enum.RenderPriority.Last.Value self._lifecycle = false self._nextId = 0 self._maid:GiveTask(CollectionService:GetInstanceAddedSignal(tag):Connect(function(instance) if (IsDescendantOfWhitelist(instance)) then self:_instanceAdded(instance) end end)) self._maid:GiveTask(CollectionService:GetInstanceRemovedSignal(tag):Connect(function(instance) self:_instanceRemoved(instance) end)) self._maid:GiveTask(self._lifecycleMaid) do local b = Instance.new("BindableEvent") for _,instance in ipairs(CollectionService:GetTagged(tag)) do if (IsDescendantOfWhitelist(instance)) then local c = b.Event:Connect(function() self:_instanceAdded(instance) end) b:Fire() c:Disconnect() end end b:Destroy() end componentsByTag[tag] = self self._maid:GiveTask(function() componentsByTag[tag] = nil end) return self end function Component:_startHeartbeatUpdate() local all = self._objects self._heartbeatUpdate = RunService.Heartbeat:Connect(function(dt) for _,v in ipairs(all) do v:HeartbeatUpdate(dt) end end) self._lifecycleMaid:GiveTask(self._heartbeatUpdate) end function Component:_startSteppedUpdate() local all = self._objects self._steppedUpdate = RunService.Stepped:Connect(function(_, dt) for _,v in ipairs(all) do v:SteppedUpdate(dt) end end) self._lifecycleMaid:GiveTask(self._steppedUpdate) end function Component:_startRenderUpdate() local all = self._objects self._renderName = (self._tag .. "RenderUpdate") RunService:BindToRenderStep(self._renderName, self._renderPriority, function(dt) for _,v in ipairs(all) do v:RenderUpdate(dt) end end) self._lifecycleMaid:GiveTask(function() RunService:UnbindFromRenderStep(self._renderName) end) end function Component:_startLifecycle() self._lifecycle = true if (self._hasHeartbeatUpdate) then self:_startHeartbeatUpdate() end if (self._hasSteppedUpdate) then self:_startSteppedUpdate() end if (self._hasRenderUpdate) then self:_startRenderUpdate() end end function Component:_stopLifecycle() self._lifecycle = false self._lifecycleMaid:DoCleaning() end function Component:_instanceAdded(instance) if (self._instancesToObjects[instance]) then return end if (not self._lifecycle) then self:_startLifecycle() end self._nextId = (self._nextId + 1) local id = (self._tag .. tostring(self._nextId)) if (IS_SERVER) then instance:SetAttribute(ATTRIBUTE_ID_NAME, id) end local obj = self._class.new(instance) obj.Instance = instance obj._id = id self._instancesToObjects[instance] = obj table.insert(self._objects, obj) if (self._hasInit) then Thread.Spawn(function() if (self._instancesToObjects[instance] ~= obj) then return end obj:Init() end) end self.Added:Fire(obj) return obj end function Component:_instanceRemoved(instance) self._instancesToObjects[instance] = nil for i,obj in ipairs(self._objects) do if (obj.Instance == instance) then if (self._hasDeinit) then obj:Deinit() end if (IS_SERVER and instance.Parent and instance:GetAttribute(ATTRIBUTE_ID_NAME) ~= nil) then instance:SetAttribute(ATTRIBUTE_ID_NAME, nil) end self.Removed:Fire(obj) obj:Destroy() obj._destroyed = true FastRemove(self._objects, i) break end end if (#self._objects == 0 and self._lifecycle) then self:_stopLifecycle() end end function Component:GetAll() return TableUtil.CopyShallow(self._objects) end function Component:GetFromInstance(instance) return self._instancesToObjects[instance] end function Component:GetFromID(id) for _,v in ipairs(self._objects) do if (v._id == id) then return v end end return nil end function Component:Filter(filterFunc) return TableUtil.Filter(self._objects, filterFunc) end function Component:WaitFor(instance, timeout) local isName = (type(instance) == "string") local function IsInstanceValid(obj) return ((isName and obj.Instance.Name == instance) or ((not isName) and obj.Instance == instance)) end for _,obj in ipairs(self._objects) do if (IsInstanceValid(obj)) then return Promise.resolve(obj) end end local lastObj = nil return Promise.FromEvent(self.Added, function(obj) lastObj = obj return IsInstanceValid(obj) end):Then(function() return lastObj end):Timeout(timeout or DEFAULT_WAIT_FOR_TIMEOUT) end function Component:Destroy() self._maid:Destroy() end return Component
-- Encuentra el sonido llamado "hyperx" en el servicio de sonido
local sound = soundService:FindFirstChild("ruby")
--------------------[ KEYBOARD FUNCTIONS ]--------------------------------------------
function KeyDown(K) local Key = string.lower(K) if Key == S.LowerStanceKey and S.CanChangeStance then if (not Running) then if Stance == 0 then Crouch() elseif Stance == 1 then Prone() end elseif S.DolphinDive then delay(1 / 30,function() CanRun = false Dive(S.BaseWalkSpeed) Run_Key_Pressed = false wait(S.DiveRechargeTime) CanRun = true end) end end if Key == S.RaiseStanceKey and S.CanChangeStance then if (not Running) then if Stance == 2 then Crouch() elseif Stance == 1 then Stand() end end end if Key == S.ADSKey then if S.HoldMouseOrKeyToADS then if (not AimingIn) and (not Aimed) then AimingIn = true AimGun() AimingIn = false end else if Aimed then UnAimGun() else AimGun() end end end if Key == S.ReloadKey then if (not Reloading) and (not Running) then Reload() end end if Key == S.KnifeKey and S.CanKnife then if KnifeReady and (not Knifing) and (not ThrowingGrenade) then if Aimed then UnAimGun(true) end BreakReload = true Knifing = true KnifeReady = false KnifeAnim() BreakReload = false Knifing = false delay(S.KnifeCooldown, function() KnifeReady = true end) end end if Key == S.LethalGrenadeKey and S.Throwables then if (not Knifing) and (not Running) and (not Aimed) and (not Aiming) and (not ThrowingGrenade) then if LethalGrenades.Value > 0 then LethalGrenades.Value = LethalGrenades.Value - 1 ThrowingGrenade = true ThrowGrenade(1) ThrowingGrenade = false end end end if Key == S.TacticalGrenadeKey and S.Throwables then if (not Knifing) and (not Running) and (not Aimed) and (not Aiming) and (not ThrowingGrenade) then if TacticalGrenades.Value > 0 then TacticalGrenades.Value = TacticalGrenades.Value - 1 ThrowingGrenade = true ThrowGrenade(2) ThrowingGrenade = false end end end if Key == S.SprintKey then Run_Key_Pressed = true if Aimed and (not Aiming) then TakingBreath = false SteadyCamera() end if CanRun then if (not Idleing) and Walking and (not Running) and (not Knifing) and (not ThrowingGrenade) then if Reloading then BreakReload = true end MonitorStamina() end end end end function KeyUp(K) local Key = string.lower(K) if Key == S.ADSKey then if S.HoldMouseOrKeyToADS then if (not AimingOut) and Aimed then AimingOut = true UnAimGun() AimingOut = false end end end if Key == S.SprintKey then Run_Key_Pressed = false Running = false if (not ChargingStamina) then RechargeStamina() end end end
--------| Library |--------
local _L = require(game.ReplicatedStorage:WaitForChild("Framework"):WaitForChild("Library")) while (not _L.Loaded) do game:GetService("RunService").Heartbeat:Wait() end
--------------------) Settings
Damage = 0 -- the ammout of health the player or mob will take Cooldown = 10 -- cooldown for use of the tool again ZoneModelName = "Spin Orange bone" -- name the zone model MobHumanoidName = "Humanoid"-- the name of player or mob u want to damage
-- Objects
local plr = playerService.LocalPlayer local char = plr.Character or plr.CharacterAdded:wait() local settingsDir = script.Settings function getSetting (name) return settingsDir and settingsDir:FindFirstChild(name) and settingsDir[name].Value end local normalSpeed = getSetting("Walking speed") or 18 -- The player's walking speed (Roblox default is 16) local sprintSpeed = getSetting("Running speed") or 26 -- The player's speed while sprinting local sprinting = false inputService.InputBegan:Connect(function (key) if key.KeyCode == Enum.KeyCode.LeftShift or key.KeyCode == Enum.KeyCode.RightShift then running = true if char:FindFirstChild("Humanoid") then char.Humanoid.WalkSpeed = sprintSpeed end end end) inputService.InputEnded:Connect(function (key) if key.KeyCode == Enum.KeyCode.LeftShift or key.KeyCode == Enum.KeyCode.RightShift then running = false if char:FindFirstChild("Humanoid") then char.Humanoid.WalkSpeed = normalSpeed end end end)
-- DefaultValue for spare ammo
local SpareAmmo = 16
-- --
local Monster = {} -- Create the monster class function Monster:GetCFrame() -- Returns the CFrame of the monster's humanoidrootpart local humanoidRootPart = Self:FindFirstChild('HumanoidRootPart') if humanoidRootPart ~= nil and humanoidRootPart:IsA('BasePart') then return humanoidRootPart.CFrame else return CFrame.new() end end function Monster:GetMaximumDetectionDistance() -- Returns the maximum detection distance local setting = Settings.MaximumDetectionDistance.Value if setting < 0 then return math.huge else return setting end end function Monster:SearchForTarget() -- Finds the closest player and sets the target local players = Info.Players:GetPlayers() local closestCharacter, closestCharacterDistance for i=1, #players do local player = players[i] if player.Neutral or player.TeamColor ~= Settings.FriendlyTeam.Value then local character = player.Character if character ~= nil and character:FindFirstChild('Humanoid') ~= nil and character.Humanoid:IsA('Humanoid') then local distance = player:DistanceFromCharacter(Monster:GetCFrame().p) if distance < Monster:GetMaximumDetectionDistance() then if closestCharacter == nil then closestCharacter, closestCharacterDistance = character, distance else if closestCharacterDistance > distance then closestCharacter, closestCharacterDistance = character, distance end end end end end end if closestCharacter ~= nil then Mind.CurrentTargetHumanoid.Value = closestCharacter.Humanoid end end function Monster:TryRecomputePath() if Data.AutoRecompute or tick() - Data.LastRecomputePath > 1/Info.RecomputePathFrequency then Monster:RecomputePath() end end function Monster:GetTargetCFrame() local targetHumanoid = Mind.CurrentTargetHumanoid.Value if Monster:TargetIsValid() then return targetHumanoid.Torso.CFrame else return CFrame.new() end end function Monster:IsAlive() return Self.Humanoid.Health > 0 and Self.Humanoid.Torso ~= nil end function Monster:TargetIsValid() local targetHumanoid = Mind.CurrentTargetHumanoid.Value if targetHumanoid ~= nil and targetHumanoid:IsA 'Humanoid' and targetHumanoid.Torso ~= nil and targetHumanoid.Torso:IsA 'BasePart' then return true else return false end end function Monster:HasClearLineOfSight() -- Going to cast a ray to see if I can just see my target local myPos, targetPos = Monster:GetCFrame().p, Monster:GetTargetCFrame().p local hit, pos = Workspace:FindPartOnRayWithIgnoreList( Ray.new( myPos, targetPos - myPos ), { Self, Mind.CurrentTargetHumanoid.Value.Parent } ) if hit == nil then return true else return false end end function Monster:RecomputePath() if not Data.Recomputing then if Monster:IsAlive() and Monster:TargetIsValid() then if Monster:HasClearLineOfSight() then Data.AutoRecompute = true Data.PathCoords = { Monster:GetCFrame().p, Monster:GetTargetCFrame().p } Data.LastRecomputePath = tick() Data.CurrentNode = nil Data.CurrentNodeIndex = 2 -- Starts chasing the target without evaluating its current position else -- Do pathfinding since you can't walk straight Data.Recomputing = true -- Basically a debounce. Data.AutoRecompute = false local path = Info.PathfindingService:ComputeSmoothPathAsync( Monster:GetCFrame().p, Monster:GetTargetCFrame().p, 500 ) Data.PathCoords = path:GetPointCoordinates() Data.Recomputing = false Data.LastRecomputePath = tick() Data.CurrentNode = nil Data.CurrentNodeIndex = 1 end end end end function Monster:Update() Monster:ReevaluateTarget() Monster:SearchForTarget() Monster:TryRecomputePath() Monster:TravelPath() end function Monster:TravelPath() local closest, closestDistance, closestIndex local myPosition = Monster:GetCFrame().p local skipCurrentNode = Data.CurrentNode ~= nil and (Data.CurrentNode - myPosition).magnitude < 3 for i=Data.CurrentNodeIndex, #Data.PathCoords do local coord = Data.PathCoords[i] if not (skipCurrentNode and coord == Data.CurrentNode) then local distance = (coord - myPosition).magnitude if closest == nil then closest, closestDistance, closestIndex = coord, distance, i else if distance < closestDistance then closest, closestDistance, closestIndex = coord, distance, i else break end end end end -- if closest ~= nil then Data.CurrentNode = closest Data.CurrentNodeIndex = closestIndex local humanoid = Self:FindFirstChild 'Humanoid' if humanoid ~= nil and humanoid:IsA'Humanoid' then humanoid:MoveTo(closest) end if Monster:IsAlive() and Monster:TargetIsValid() then Monster:TryJumpCheck() Monster:TryAttack() end if closestIndex == #Data.PathCoords then -- Reached the end of the path, force a new check Data.AutoRecompute = true end end end function Monster:TryJumpCheck() if tick() - Data.LastJumpCheck > 1/Info.JumpCheckFrequency then Monster:JumpCheck() end end function Monster:TryAttack() if tick() - Data.LastAttack > 1/Settings.AttackFrequency.Value then Monster:Attack() end end function Monster:Attack() local myPos, targetPos = Monster:GetCFrame().p, Monster:GetTargetCFrame().p if (myPos - targetPos).magnitude <= Settings.AttackRange.Value then Mind.CurrentTargetHumanoid.Value:TakeDamage(Settings.AttackDamage.Value) Data.LastAttack = tick() Data.AttackTrack:Play() end end function Monster:JumpCheck() -- Do a raycast to check if we need to jump local myCFrame = Monster:GetCFrame() local checkVector = (Monster:GetTargetCFrame().p - myCFrame.p).unit*2 local hit, pos = Workspace:FindPartOnRay( Ray.new( myCFrame.p + Vector3.new(0, -2.4, 0), checkVector ), Self ) if hit ~= nil and not hit:IsDescendantOf(Mind.CurrentTargetHumanoid.Value.Parent) then -- Do a slope check to make sure we're not walking up a ramp local hit2, pos2 = Workspace:FindPartOnRay( Ray.new( myCFrame.p + Vector3.new(0, -2.3, 0), checkVector ), Self ) if hit2 == hit then if ((pos2 - pos)*Vector3.new(1,0,1)).magnitude < 0.05 then -- Will pass for any ramp with <2 slope Self.Humanoid.Jump = true end end end Data.LastJumpCheck = tick() end function Monster:Connect() Mind.CurrentTargetHumanoid.Changed:connect(function(humanoid) if humanoid ~= nil then assert(humanoid:IsA'Humanoid', 'Monster target must be a humanoid') Monster:RecomputePath() end end) end function Monster:Initialize() Monster:Connect() if Settings.AutoDetectSpawnPoint.Value then Settings.SpawnPoint.Value = Monster:GetCFrame().p end end function Monster:Respawn(point) local point = point or Settings.SpawnPoint.Value for index, obj in next, Data.BaseMonster:Clone():GetChildren() do if obj.Name == 'Configurations' or obj.Name == 'Mind' or obj.Name == 'Respawned' or obj.Name == 'Died' or obj.Name == 'MonsterScript' or obj.Name == 'Respawn' then obj:Destroy() else Self[obj.Name]:Destroy() obj.Parent = Self end end Monster:InitializeUnique() Self.Parent = Workspace Self.HumanoidRootPart.CFrame = CFrame.new(point) Settings.SpawnPoint.Value = point Self.Respawned:Fire() end function Monster:InitializeUnique() Data.AttackTrack = Self.Humanoid:LoadAnimation(script.Attack) end function Monster:ReevaluateTarget() local currentTarget = Mind.CurrentTargetHumanoid.Value if currentTarget ~= nil and currentTarget:IsA'Humanoid' then local character = currentTarget.Parent if character ~= nil then local player = Info.Players:GetPlayerFromCharacter(character) if player ~= nil then if not player.Neutral and player.TeamColor == Settings.FriendlyTeam.Value then Mind.CurrentTargetHumanoid.Value = nil end end end if currentTarget == Mind.CurrentTargetHumanoid.Value then local torso = currentTarget.Torso if torso ~= nil and torso:IsA 'BasePart' then if Settings.CanGiveUp.Value and (torso.Position - Monster:GetCFrame().p).magnitude > Monster:GetMaximumDetectionDistance() then Mind.CurrentTargetHumanoid.Value = nil end end end end end
-- METHODS
function Enum.createEnum(enumName, details) assert(typeof(enumName) == "string", "bad argument #1 - enums must be created using a string name!") assert(typeof(details) == "table", "bad argument #2 - enums must be created using a table!") assert(not enums[enumName], ("enum '%s' already exists!"):format(enumName)) local enum = {} local usedNames = {} local usedValues = {} local usedProperties = {} local enumMetaFunctions = { getName = function(valueOrProperty) valueOrProperty = tostring(valueOrProperty) local index = usedValues[valueOrProperty] if not index then index = usedProperties[valueOrProperty] end if index then return details[index][1] end end, getValue = function(nameOrProperty) nameOrProperty = tostring(nameOrProperty) local index = usedNames[nameOrProperty] if not index then index = usedProperties[nameOrProperty] end if index then return details[index][2] end end, getProperty = function(nameOrValue) nameOrValue = tostring(nameOrValue) local index = usedNames[nameOrValue] if not index then index = usedValues[nameOrValue] end if index then return details[index][3] end end } for i, detail in pairs(details) do assert(typeof(detail) == "table", ("bad argument #2.%s - details must only be comprised of tables!"):format(i)) local name = detail[1] assert(typeof(name) == "string", ("bad argument #2.%s.1 - detail name must be a string!"):format(i)) assert(typeof(not usedNames[name]), ("bad argument #2.%s.1 - the detail name '%s' already exists!"):format(i, name)) assert(typeof(not enumMetaFunctions[name]), ("bad argument #2.%s.1 - that name is reserved."):format(i, name)) usedNames[tostring(name)] = i local value = detail[2] local valueString = tostring(value) --assert(typeof(value) == "number" and math.ceil(value)/value == 1, ("bad argument #2.%s.2 - detail value must be an integer!"):format(i)) assert(typeof(not usedValues[valueString]), ("bad argument #2.%s.2 - the detail value '%s' already exists!"):format(i, valueString)) usedValues[valueString] = i local property = detail[3] if property then assert(typeof(not usedProperties[property]), ("bad argument #2.%s.3 - the detail property '%s' already exists!"):format(i, tostring(property))) usedProperties[tostring(property)] = i end enum[name] = value setmetatable(enum, { __index = function(_, index) return(enumMetaFunctions[index]) end }) end enums[enumName] = enum return enum end function Enum.getEnums() return enums end
--
larm = character:WaitForChild("Left Arm") rarm = character:WaitForChild("Right Arm") if firstperson_arm_transparency >= 1 then armsvisible = false end
--[[ Controls State Management ]]
-- local onControlsChanged = nil if IsTouchDevice then createTouchGuiContainer() onControlsChanged = function() local newModuleToEnable = nil if not IsUserChoice then if DevMovementMode == Enum.DevTouchMovementMode.Thumbstick then newModuleToEnable = ControlModules.Thumbstick isJumpEnabled = true elseif DevMovementMode == Enum.DevTouchMovementMode.Thumbpad then newModuleToEnable = ControlModules.Thumbpad isJumpEnabled = true elseif DevMovementMode == Enum.DevTouchMovementMode.DPad then newModuleToEnable = ControlModules.DPad isJumpEnabled = false elseif DevMovementMode == Enum.DevTouchMovementMode.ClickToMove then -- Managed by CameraScript newModuleToEnable = nil elseif DevMovementMode == Enum.DevTouchMovementMode.Scriptable then newModuleToEnable = nil end else if UserMovementMode == Enum.TouchMovementMode.Default or UserMovementMode == Enum.TouchMovementMode.Thumbstick then newModuleToEnable = ControlModules.Thumbstick isJumpEnabled = true elseif UserMovementMode == Enum.TouchMovementMode.Thumbpad then newModuleToEnable = ControlModules.Thumbpad isJumpEnabled = true elseif UserMovementMode == Enum.TouchMovementMode.DPad then newModuleToEnable = ControlModules.DPad isJumpEnabled = false elseif UserMovementMode == Enum.TouchMovementMode.ClickToMove then -- Managed by CameraScript newModuleToEnable = nil end end setClickToMove() if newModuleToEnable ~= CurrentControlModule then if CurrentControlModule then CurrentControlModule:Disable() end setJumpModule(isJumpEnabled) CurrentControlModule = newModuleToEnable if CurrentControlModule and not IsModalEnabled then CurrentControlModule:Enable() if isJumpEnabled then TouchJumpModule:Enable() end end end end elseif UserInputService.KeyboardEnabled then onControlsChanged = function() -- NOTE: Click to move still uses keyboard. Leaving cases in case this ever changes. local newModuleToEnable = nil if not IsUserChoice then if DevMovementMode == Enum.DevComputerMovementMode.KeyboardMouse then newModuleToEnable = ControlModules.Keyboard elseif DevMovementMode == Enum.DevComputerMovementMode.ClickToMove then -- Managed by CameraScript newModuleToEnable = ControlModules.Keyboard end else if UserMovementMode == Enum.ComputerMovementMode.KeyboardMouse or UserMovementMode == Enum.ComputerMovementMode.Default then newModuleToEnable = ControlModules.Keyboard elseif UserMovementMode == Enum.ComputerMovementMode.ClickToMove then -- Managed by CameraScript newModuleToEnable = ControlModules.Keyboard end end if newModuleToEnable ~= CurrentControlModule then if CurrentControlModule then CurrentControlModule:Disable() end CurrentControlModule = newModuleToEnable if CurrentControlModule then CurrentControlModule:Enable() end end end elseif UserInputService.GamepadEnabled then onControlsChanged = function() -- nil for now, probably needs some stuff later end end
-------- OMG HAX
r = game:service("RunService") local damage = 0 local slash_damage = 0 local lunge_damage = 0 sword = script.Parent.Handle Tool = script.Parent local SlashSound = Instance.new("Sound") SlashSound.SoundId = "rbxasset://sounds\\swordslash.wav" SlashSound.Parent = sword SlashSound.Volume = 7 local LungeSound = Instance.new("Sound") LungeSound.SoundId = "rbxasset://sounds\\swordlunge.wav" LungeSound.Parent = sword LungeSound.Volume = 8 function blow(hit) if (hit.Parent == nil) then return end -- happens when bullet hits sword local humanoid = hit.Parent:findFirstChild("Humanoid") local vCharacter = Tool.Parent local vPlayer = game.Players:playerFromCharacter(vCharacter) local hum = vCharacter:findFirstChild("Humanoid") -- non-nil if tool held by a character if humanoid~=nil and humanoid ~= hum and hum ~= nil then -- final check, make sure sword is in-hand local right_arm = vCharacter:FindFirstChild("Right Arm") if (right_arm ~= nil) then local joint = right_arm:FindFirstChild("RightGrip") if (joint ~= nil and (joint.Part0 == sword or joint.Part1 == sword)) then tagHumanoid(humanoid, vPlayer) humanoid:TakeDamage(damage) wait(1) untagHumanoid(humanoid) end end end end function tagHumanoid(humanoid, player) local creator_tag = Instance.new("ObjectValue") creator_tag.Value = player creator_tag.Name = "creator" creator_tag.Parent = humanoid end function untagHumanoid(humanoid) if humanoid ~= nil then local tag = humanoid:findFirstChild("creator") if tag ~= nil then tag.Parent = nil end end end function attack() if script.Parent.Parent.Humanoid.Health>0 then damage = slash_damage SlashSound:play() local anim = Instance.new("StringValue") anim.Name = "toolanim" anim.Value = "Slash" anim.Parent = Tool wait(3) attack() end end function lunge() damage = lunge_damage LungeSound:play() local anim = Instance.new("StringValue") anim.Name = "toolanim" anim.Value = "Lunge" anim.Parent = Tool force = Instance.new("BodyVelocity") force.velocity = Vector3.new(0,10,0) --Tool.Parent.Torso.CFrame.lookVector * 80 force.Parent = Tool.Parent.Torso wait(.25) swordOut() wait(.25) force.Parent = nil wait(.5) swordUp() damage = slash_damage end function swordUp() Tool.GripForward = Vector3.new(-1,0,0) Tool.GripRight = Vector3.new(0,1,0) Tool.GripUp = Vector3.new(0,0,1) end function swordOut() Tool.GripForward = Vector3.new(0,0,1) Tool.GripRight = Vector3.new(0,-1,0) Tool.GripUp = Vector3.new(-1,0,0) end function swordAcross() -- parry end Tool.Enabled = true local last_attack = 0 function onActivated() if not Tool.Enabled then return end Tool.Enabled = false local character = Tool.Parent; local humanoid = character.Humanoid if humanoid == nil then print("Humanoid not found") return end t = r.Stepped:wait() if (t - last_attack < .2) then lunge() else attack() end last_attack = t --wait(.5) Tool.Enabled = true end function onEquipped() end attack() script.Parent.Activated:connect(onActivated) script.Parent.Equipped:connect(onEquipped) connection = sword.Touched:connect(blow)
-- Define the function to open or close the window with gene-alike effect
local function toggleWindow() if window.Visible then window.Visible = false else window.Visible = true end end
--// All global vars will be wiped/replaced except script --// All guis are autonamed client.Variables.CodeName..gui.Name --// Be sure to update the console gui's code if you change stuff
return function(data, env) if env then setfenv(1, env) end local client, cPcall, Pcall, Routine, service, gTable = client, cPcall, Pcall, Routine, service, gTable local gui = script.Parent.Parent local localplayer = service.Player local mouse = localplayer:GetMouse() local playergui = service.PlayerGui local storedChats = client.Variables.StoredChats local desc = gui.Desc local nohide = data.KeepChat local function Expand(ent, point) ent.MouseLeave:Connect(function(x, y) point.Visible = false end) ent.MouseMoved:Connect(function(x, y) point.Text = ent.Desc.Value point.Size = UDim2.new(0, 10000, 0, 10000) local bounds = point.TextBounds.X local rows = math.floor(bounds / 500) rows = rows + 1 if rows < 1 then rows = 1 end local newx = 500 if bounds < 500 then newx = bounds end point.Visible = true point.Size = UDim2.new(0, newx + 10, 0, rows * 20) point.Position = UDim2.new(0, x, 0, y - 40 - (rows * 20)) end) end local function UpdateChat() if gui then local globalTab = gui.Drag.Frame.Frame.Global local teamTab = gui.Drag.Frame.Frame.Team local localTab = gui.Drag.Frame.Frame.Local local adminsTab = gui.Drag.Frame.Frame.Admins local crossTab = gui.Drag.Frame.Frame.Cross local entry = gui.Entry local tester = gui.BoundTest globalTab:ClearAllChildren() teamTab:ClearAllChildren() localTab:ClearAllChildren() adminsTab:ClearAllChildren() crossTab:ClearAllChildren() local globalNum = 0 local teamNum = 0 local localNum = 0 local adminsNum = 0 local crossNum = 0 for i, v in pairs(storedChats) do local clone = entry:Clone() clone.Message.Text = service.MaxLen(v.Message, 100) clone.Desc.Value = v.Message Expand(clone, desc) if not string.match(v.Player, "%S") then clone.Nameb.Text = v.Player else clone.Nameb.Text = "["..v.Player.."]: " end clone.Visible = true clone.Nameb.Font = "SourceSansBold" local color = v.Color or BrickColor.White() clone.Nameb.TextColor3 = color.Color tester.Text = "["..v.Player.."]: " local naml = tester.TextBounds.X + 5 if naml > 100 then naml = 100 end tester.Text = v.Message local mesl = tester.TextBounds.X clone.Message.Position = UDim2.new(0, naml, 0, 0) clone.Message.Size = UDim2.new(1, -(naml + 10), 1, 0) clone.Nameb.Size = UDim2.new(0, naml, 0, 20) clone.Visible = false clone.Parent = globalTab local rows = math.floor((mesl + naml) / clone.AbsoluteSize.X) rows = rows + 1 if rows < 1 then rows = 1 end if rows > 3 then rows = 3 end --rows = rows+1 clone.Parent = nil clone.Visible = true clone.Size = UDim2.new(1, 0, 0, rows * 20) if v.Private then clone.Nameb.TextColor3 = Color3.new(0.58823529411765, 0.22352941176471, 0.69019607843137) end if v.Mode == "Global" then clone.Position = UDim2.new(0, 0, 0, globalNum * 20) globalNum = globalNum + 1 if rows > 1 then globalNum = globalNum + rows - 1 end clone.Parent = globalTab elseif v.Mode == "Team" then clone.Position = UDim2.new(0, 0, 0, teamNum * 20) teamNum = teamNum + 1 if rows > 1 then teamNum = teamNum + rows - 1 end clone.Parent = teamTab elseif v.Mode == "Local" then clone.Position = UDim2.new(0, 0, 0, localNum * 20) localNum = localNum + 1 if rows > 1 then localNum = localNum + rows - 1 end clone.Parent = localTab elseif v.Mode == "Admins" then clone.Position = UDim2.new(0, 0, 0, adminsNum * 20) adminsNum = adminsNum + 1 if rows > 1 then adminsNum = adminsNum + rows - 1 end clone.Parent = adminsTab elseif v.Mode == "Cross" then clone.Position = UDim2.new(0, 0, 0, crossNum * 20) crossNum = crossNum + 1 if rows > 1 then crossNum = crossNum + rows - 1 end clone.Parent = crossTab end end globalTab.CanvasSize = UDim2.new(0, 0, 0, ((globalNum) * 20)) teamTab.CanvasSize = UDim2.new(0, 0, 0, ((teamNum) * 20)) localTab.CanvasSize = UDim2.new(0, 0, 0, ((localNum) * 20)) adminsTab.CanvasSize = UDim2.new(0, 0, 0, ((adminsNum) * 20)) crossTab.CanvasSize = UDim2.new(0, 0, 0, ((crossNum) * 20)) local glob = (((globalNum) * 20) - globalTab.AbsoluteWindowSize.Y) local tea = (((teamNum) * 20) - teamTab.AbsoluteWindowSize.Y) local loc = (((localNum) * 20) - localTab.AbsoluteWindowSize.Y) local adm = (((adminsNum) * 20) - adminsTab.AbsoluteWindowSize.Y) local cro = (((crossNum) * 20) - crossTab.AbsoluteWindowSize.Y) if glob < 0 then glob = 0 end if tea < 0 then tea = 0 end if loc < 0 then loc = 0 end if adm < 0 then adm = 0 end if cro < 0 then cro = 0 end globalTab.CanvasPosition = Vector2.new(0, glob) teamTab.CanvasPosition = Vector2.new(0, tea) localTab.CanvasPosition = Vector2.new(0, loc) adminsTab.CanvasPosition = Vector2.new(0, adm) crossTab.CanvasPosition = Vector2.new(0, cro) end end if not storedChats then client.Variables.StoredChats = {} storedChats = client.Variables.StoredChats end gTable:Ready() local bubble = gui.Bubble local toggle = gui.Toggle local drag = gui.Drag local frame = gui.Drag.Frame local frame2 = gui.Drag.Frame.Frame local box = gui.Drag.Frame.Chat local globalTab = gui.Drag.Frame.Frame.Global local teamTab = gui.Drag.Frame.Frame.Team local localTab = gui.Drag.Frame.Frame.Local local adminsTab = gui.Drag.Frame.Frame.Admins local crossTab = gui.Drag.Frame.Frame.Cross local global = gui.Drag.Frame.Global local team = gui.Drag.Frame.Team local localb = gui.Drag.Frame.Local local admins = gui.Drag.Frame.Admins local cross = gui.Drag.Frame.Cross if not nohide then client.Variables.CustomChat = true client.Variables.ChatEnabled = false service.StarterGui:SetCoreGuiEnabled('Chat', false) else drag.Position = UDim2.new(0, 10, 1, -180) end local dragger = gui.Drag.Frame.Dragger local fakeDrag = gui.Drag.Frame.FakeDragger local boxFocused = false local mode = "Global" local lastChat = 0 local lastClick = 0 local isAdmin = client.Remote.Get("CheckAdmin") if not isAdmin then admins.BackgroundTransparency = 0.8 admins.TextTransparency = 0.8 cross.BackgroundTransparency = 0.8 cross.TextTransparency = 0.8 end if client.UI.Get("HelpButton") then toggle.Position = UDim2.new(1, -90, 1, -45) end local function openGlobal() globalTab.Visible = true teamTab.Visible = false localTab.Visible = false adminsTab.Visible = false crossTab.Visible = false global.Text = "Global" mode = "Global" global.BackgroundTransparency = 0 team.BackgroundTransparency = 0.5 localb.BackgroundTransparency = 0.5 if isAdmin then admins.BackgroundTransparency = 0.5 admins.TextTransparency = 0 cross.BackgroundTransparency = 0.5 cross.TextTransparency = 0 else admins.BackgroundTransparency = 0.8 admins.TextTransparency = 0.8 cross.BackgroundTransparency = 0.8 cross.TextTransparency = 0.8 end end local function openTeam() globalTab.Visible = false teamTab.Visible = true localTab.Visible = false adminsTab.Visible = false crossTab.Visible = false team.Text = "Team" mode = "Team" global.BackgroundTransparency = 0.5 team.BackgroundTransparency = 0 localb.BackgroundTransparency = 0.5 admins.BackgroundTransparency = 0.5 if isAdmin then admins.BackgroundTransparency = 0.5 admins.TextTransparency = 0 cross.BackgroundTransparency = 0.5 cross.TextTransparency = 0 else admins.BackgroundTransparency = 0.8 admins.TextTransparency = 0.8 cross.BackgroundTransparency = 0.8 cross.TextTransparency = 0.8 end end local function openLocal() globalTab.Visible = false teamTab.Visible = false localTab.Visible = true adminsTab.Visible = false crossTab.Visible = false localb.Text = "Local" mode = "Local" global.BackgroundTransparency = 0.5 team.BackgroundTransparency = 0.5 localb.BackgroundTransparency = 0 admins.BackgroundTransparency = 0.5 if isAdmin then admins.BackgroundTransparency = 0.5 admins.TextTransparency = 0 cross.BackgroundTransparency = 0.5 cross.TextTransparency = 0 else admins.BackgroundTransparency = 0.8 admins.TextTransparency = 0.8 cross.BackgroundTransparency = 0.8 cross.TextTransparency = 0.8 end end local function openAdmins() globalTab.Visible = false teamTab.Visible = false localTab.Visible = false adminsTab.Visible = true crossTab.Visible = false admins.Text = "Admins" mode = "Admins" global.BackgroundTransparency = 0.5 team.BackgroundTransparency = 0.5 localb.BackgroundTransparency = 0.5 if isAdmin then admins.BackgroundTransparency = 0 admins.TextTransparency = 0 cross.BackgroundTransparency = 0.5 cross.TextTransparency = 0 else admins.BackgroundTransparency = 0.8 admins.TextTransparency = 0.8 cross.BackgroundTransparency = 0.8 cross.TextTransparency = 0.8 end end local function openCross() globalTab.Visible = false teamTab.Visible = false localTab.Visible = false adminsTab.Visible = false crossTab.Visible = true cross.Text = "Cross" mode = "Cross" global.BackgroundTransparency = 0.5 team.BackgroundTransparency = 0.5 localb.BackgroundTransparency = 0.5 if isAdmin then admins.BackgroundTransparency = 0.5 admins.TextTransparency = 0 cross.BackgroundTransparency = 0 cross.TextTransparency = 0 else admins.BackgroundTransparency = 0.8 admins.TextTransparency = 0.8 cross.BackgroundTransparency = 0.8 cross.TextTransparency = 0.8 end end local function fadeIn() --[[ frame.BackgroundTransparency = 0.5 frame2.BackgroundTransparency = 0.5 box.BackgroundTransparency = 0.5 for i=0.1,0.5,0.1 do --wait(0.1) frame.BackgroundTransparency = 0.5-i frame2.BackgroundTransparency = 0.5-i box.BackgroundTransparency = 0.5-i end-- Disabled ]] frame.BackgroundTransparency = 0 frame2.BackgroundTransparency = 0 box.BackgroundTransparency = 0 fakeDrag.Visible = true end local function fadeOut() --[[ frame.BackgroundTransparency = 0 frame2.BackgroundTransparency = 0 box.BackgroundTransparency = 0 for i=0.1,0.5,0.1 do --wait(0.1) frame.BackgroundTransparency = i frame2.BackgroundTransparency = i box.BackgroundTransparency = i end-- Disabled ]] frame.BackgroundTransparency = 0.7 frame2.BackgroundTransparency = 1 box.BackgroundTransparency = 1 fakeDrag.Visible = false end fadeOut() frame.MouseEnter:Connect(function() fadeIn() end) frame.MouseLeave:Connect(function() if not boxFocused then fadeOut() end end) toggle.MouseButton1Click:Connect(function() if drag.Visible then drag.Visible = false toggle.Image = "rbxassetid://417301749"--417285299" else drag.Visible = true toggle.Image = "rbxassetid://417301773"--417285351" end end) global.MouseButton1Click:Connect(function() openGlobal() end) team.MouseButton1Click:Connect(function() openTeam() end) localb.MouseButton1Click:Connect(function() openLocal() end) admins.MouseButton1Click:Connect(function() if isAdmin or tick() - lastClick > 5 then isAdmin = client.Remote.Get("CheckAdmin") if isAdmin then openAdmins() else admins.BackgroundTransparency = 0.8 admins.TextTransparency = 0.8 end lastClick = tick() end end) cross.MouseButton1Click:Connect(function() if isAdmin or tick() - lastClick > 5 then isAdmin = client.Remote.Get("CheckAdmin") if isAdmin then openCross() else cross.BackgroundTransparency = 0.8 cross.TextTransparency = 0.8 end lastClick = tick() end end) box.FocusLost:Connect(function(enterPressed) boxFocused = false if enterPressed and not client.Variables.Muted then if box.Text ~= '' and ((mode ~= "Cross" and tick() - lastChat >= 0.5) or (mode == "Cross" and tick() - lastChat >= 10)) then if not client.Variables.Muted then client.Remote.Send('ProcessCustomChat', box.Text, mode) lastChat = tick() end elseif not ((mode ~= "Cross" and tick() - lastChat >= 0.5) or (mode == "Cross" and tick() - lastChat >= 10)) then local tim if mode == "Cross" then tim = 10 - (tick() - lastChat) else tim = 0.5 - (tick() - lastChat) end tim = string.sub(tostring(tim), 1, 3) client.Handlers.ChatHandler("SpamBot", "Sending too fast! Please wait "..tostring(tim).." seconds.", "System") end box.Text = "Click here or press the '/' key to chat" fadeOut() if mode ~= "Cross" then lastChat = tick() end end end) box.Focused:Connect(function() boxFocused = true if box.Text == "Click here or press the '/' key to chat" then box.Text = '' end fadeIn() end) if not nohide then service.UserInputService.InputBegan:Connect(function(InputObject) local textbox = service.UserInputService:GetFocusedTextBox() if not (textbox) and InputObject.UserInputType == Enum.UserInputType.Keyboard and InputObject.KeyCode == Enum.KeyCode.Slash then if box.Text == "Click here or press the '/' key to chat" then box.Text = '' end service.RunService.RenderStepped:Wait() box:CaptureFocus() end end) end local dragging = false local nx, ny = drag.AbsoluteSize.X, frame.AbsoluteSize.Y --450,200 local defx, defy = nx, ny mouse.Move:Connect(function(x, y) if dragging then nx = math.clamp(defx + (dragger.Position.X.Offset + 20), 1, 260) ny = math.clamp(defy + (dragger.Position.Y.Offset + 20), 1, 100) frame.Size = UDim2.new(1, 0, 0, ny) drag.Size = UDim2.new(0, nx, 0, 30) end end) dragger.DragBegin:Connect(function(init) dragging = true end) dragger.DragStopped:Connect(function(x, y) dragging = false defx = nx defy = ny dragger.Position = UDim2.new(1, -20, 1, -20) UpdateChat() end) UpdateChat()
--Wheel Setup--
for i, child in pairs(script.Parent.Parent.Parent.FL:GetChildren()) do if child:IsA("UnionOperation") then child.CanCollide = false child.Name = "WheelPart" end if child:IsA("Part") and not child:IsA("UnionOperation") then child.CanCollide = false if (child.Shape ~= Enum.PartType.Ball) or (child.Name == "Wheel") then child.Name = "WheelPart" end if (child.Shape == Enum.PartType.Ball) and not child.Parent:FindFirstChild("Wheel") then child.Name = "Wheel" end end end for i, child in pairs(script.Parent.Parent.Parent.FR:GetChildren()) do if child:IsA("UnionOperation") then child.CanCollide = false child.Name = "WheelPart" end if child:IsA("Part") and not child:IsA("UnionOperation") then child.CanCollide = false if (child.Shape ~= Enum.PartType.Ball) or (child.Name == "Wheel") then child.Name = "WheelPart" end if (child.Shape == Enum.PartType.Ball) and not child.Parent:FindFirstChild("Wheel") then child.Name = "Wheel" end end end for i, child in pairs(script.Parent.Parent.Parent.RL:GetChildren()) do if child:IsA("UnionOperation") then child.CanCollide = false child.Name = "WheelPart" end if child:IsA("Part") and not child:IsA("UnionOperation") then child.CanCollide = false if (child.Shape ~= Enum.PartType.Ball) or (child.Name == "Wheel") then child.Name = "WheelPart" end if (child.Shape == Enum.PartType.Ball) and not child.Parent:FindFirstChild("Wheel") then child.Name = "Wheel" end end end for i, child in pairs(script.Parent.Parent.Parent.RR:GetChildren()) do if child:IsA("UnionOperation") then child.CanCollide = false child.Name = "WheelPart" end if child:IsA("Part") and not child:IsA("UnionOperation") then child.CanCollide = false if (child.Shape ~= Enum.PartType.Ball) or (child.Name == "Wheel") then child.Name = "WheelPart" end if (child.Shape == Enum.PartType.Ball) and not child.Parent:FindFirstChild("Wheel") then child.Name = "Wheel" end end end local FL = script.Parent.Parent.Parent.FL.Wheel local FR = script.Parent.Parent.Parent.FR.Wheel local RL = script.Parent.Parent.Parent.RL.Wheel local RR = script.Parent.Parent.Parent.RR.Wheel local zfl = FL:Clone() zfl.Parent = script.Parent.Parent.Parent.FL zfl.Name = "Part" zfl.Transparency = 0 zfl.CFrame = FL.CFrame local zfr = FR:Clone() zfr.Parent = script.Parent.Parent.Parent.FR zfr.Name = "Part" zfr.Transparency = 0 zfr.CFrame = FR.CFrame local zrl = RL:Clone() zrl.Parent = script.Parent.Parent.Parent.RL zrl.Name = "Part" zrl.Transparency = 0 zrl.CFrame = RL.CFrame local zrr = RR:Clone() zrr.Parent = script.Parent.Parent.Parent.RR zrr.Name = "Part" zrr.Transparency = 0 zrr.CFrame = RR.CFrame FL.CanCollide = true FR.CanCollide = true RL.CanCollide = true RR.CanCollide = true FL.Transparency = 1 FR.Transparency = 1 RL.Transparency = 1 RR.Transparency = 1 ManualOnly = false SuspensionTravelF = 1 SuspensionTravelR = 1 Radio = false ActiveStabilityControl = false AutoClutch = false Mode = "Sport" if WHEELS_VISIBLE == false then zfl.Transparency = 1 zfr.Transparency = 1 zrl.Transparency = 1 zrr.Transparency = 1 else zfl.Transparency = 0 zfr.Transparency = 0 zrl.Transparency = 0 zrr.Transparency = 0 end FL.Rotation = script.Parent.Rotation FR.Rotation = script.Parent.Rotation RL.Rotation = script.Parent.Rotation RR.Rotation = script.Parent.Rotation for _,v in pairs(FL:GetChildren()) do if v:IsA("Decal") then v:Destroy() end end for _,v in pairs(FR:GetChildren()) do if v:IsA("Decal") then v:Destroy() end end for _,v in pairs(RL:GetChildren()) do if v:IsA("Decal") then v:Destroy() end end for _,v in pairs(RR:GetChildren()) do if v:IsA("Decal") then v:Destroy() end end
--On lines 10 and 29 change Gold to the name of your money and Exp to the stat you wish to upgrade.
local Humanoid = script.Parent.Human -- Change Enemy to the name of your Monsters Humanoid function PwntX_X() local tag = Humanoid:findFirstChild("creator") if tag ~= nil then if tag.Value ~= nil then local Leaderstats = tag.Value:findFirstChild("leaderstats") if Leaderstats ~= nil then Leaderstats.Gold.Value = Leaderstats.Gold.Value + 2500 --How Much Money Given wait(0.1) script:remove() end end end end Humanoid.Died:connect(PwntX_X) local Humanoid = script.Parent.Human -- Change Enemy to the name of your Monsters Humaniod function PwntX_X() local tag = Humanoid:findFirstChild("creator") if tag ~= nil then if tag.Value ~= nil then local Leaderstats = tag.Value:findFirstChild("leaderstats") if Leaderstats ~= nil then Leaderstats.XP.Value = Leaderstats.XP.Value + 1500 --How Much XP Given wait(0.1) script:remove() end end end end Humanoid.Died:connect(PwntX_X)
--// SS3 controls for AC6 by Itzt, originally for 2014 Infiniti QX80. i don't know how to tune ac lol
wait(0.1) local player = game.Players.LocalPlayer local carSeat = script.Parent.CarSeat.Value local mouse = game.Players.LocalPlayer:GetMouse() local windows = false local winfob = script.Parent.Music local handler = carSeat:WaitForChild('Filter')
-- Overrides Keyboard:UpdateMovement(inputState) to conditionally consider self.wasdEnabled
function ClickToMove:UpdateMovement(inputState) if inputState == Enum.UserInputState.Cancel then self.moveVector = ZERO_VECTOR3 elseif self.wasdEnabled then self.moveVector = Vector3.new(self.leftValue + self.rightValue, 0, self.forwardValue + self.backwardValue) end end return ClickToMove
--// You can use modules like this to alter guis without making a new theme --// This makes it so you don't need to make an entire gui folder n all that --// If the theme is set to this module, it will use the default guis --// The default requested gui will be passed to and modified by this module --// before it runs. This lets you change things in anyway you want without --// needing to change the guis by hand or their code. --// This is also generally safer and update proof. --// Alternatively if this returns anything, it will be assumed --// that this module created and registered it's own screenguis --// It will assume that any return is from those guis --// For instance the YesNoPrompt returns Yes or No depending on --// what button the player presses. --// Any non-nil return will be returned by the script --// IF YOU MAKE YOUR OWN SCREENGUIS IT IS UP TO YOU TO REGISTER THEM! --// If you plan to make your own guis you must return something from this module --// and you must register them using client.UI.Register(ScreenGuiObjectHere) --// Register will return gTable and gIndex, when destroying your gui --// use gTable:Destroy(); If your gui needs to be removed in a special way --// you can define a custom destroy function by doing --// gTable.CustomDestroy = function() doStuffHere end
--WalkSpeedsHere!
local WalkSpeedWhileCrouching = 8 local CurrentWalkSpeed = 16
--local infectedTeams = {["Contained Infected Subject"] = true, -- ["Latex"] = true --} --local roleTeams = { --what CIS is on that group -- {11649027,game.Teams["Medical Department"],2},--med -- {12022092,game.Teams["Janitorial Department"],3},--jan -- {11649027,game.Teams["Medical Department"],254}--Naki --}
---------END RIGHT DOOR
game.Workspace.doorleft.p1.CFrame = game.Workspace.doorleft.p1.CFrame * CFrame.new(0.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0) game.Workspace.doorleft.p2.CFrame = game.Workspace.doorleft.p2.CFrame * CFrame.new(0.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0) game.Workspace.doorleft.p3.CFrame = game.Workspace.doorleft.p3.CFrame * CFrame.new(0.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0) game.Workspace.doorleft.p4.CFrame = game.Workspace.doorleft.p4.CFrame * CFrame.new(0.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0) game.Workspace.doorleft.p5.CFrame = game.Workspace.doorleft.p5.CFrame * CFrame.new(0.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0) game.Workspace.doorleft.p6.CFrame = game.Workspace.doorleft.p6.CFrame * CFrame.new(0.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0) game.Workspace.doorleft.p7.CFrame = game.Workspace.doorleft.p7.CFrame * CFrame.new(0.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0) game.Workspace.doorleft.p8.CFrame = game.Workspace.doorleft.p8.CFrame * CFrame.new(0.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0) game.Workspace.doorleft.p9.CFrame = game.Workspace.doorleft.p9.CFrame * CFrame.new(0.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0) game.Workspace.doorleft.p10.CFrame = game.Workspace.doorleft.p10.CFrame * CFrame.new(0.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0) game.Workspace.doorleft.p11.CFrame = game.Workspace.doorleft.p11.CFrame * CFrame.new(0.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0) game.Workspace.doorleft.p12.CFrame = game.Workspace.doorleft.p12.CFrame * CFrame.new(0.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0) game.Workspace.doorleft.p13.CFrame = game.Workspace.doorleft.p13.CFrame * CFrame.new(0.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0) game.Workspace.doorleft.p14.CFrame = game.Workspace.doorleft.p14.CFrame * CFrame.new(0.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0) game.Workspace.doorleft.p15.CFrame = game.Workspace.doorleft.p15.CFrame * CFrame.new(0.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0) game.Workspace.doorleft.p16.CFrame = game.Workspace.doorleft.p16.CFrame * CFrame.new(0.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0) game.Workspace.doorleft.p17.CFrame = game.Workspace.doorleft.p17.CFrame * CFrame.new(0.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0) game.Workspace.doorleft.p18.CFrame = game.Workspace.doorleft.p18.CFrame * CFrame.new(0.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0) game.Workspace.doorleft.p19.CFrame = game.Workspace.doorleft.p19.CFrame * CFrame.new(0.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0) game.Workspace.doorleft.pillar.CFrame = game.Workspace.doorleft.pillar.CFrame * CFrame.new(0.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0) game.Workspace.doorleft.l11.CFrame = game.Workspace.doorleft.l11.CFrame * CFrame.new(0.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0) game.Workspace.doorleft.l12.CFrame = game.Workspace.doorleft.l12.CFrame * CFrame.new(0.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0) game.Workspace.doorleft.l13.CFrame = game.Workspace.doorleft.l13.CFrame * CFrame.new(0.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0) game.Workspace.doorleft.l21.CFrame = game.Workspace.doorleft.l21.CFrame * CFrame.new(0.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0) game.Workspace.doorleft.l22.CFrame = game.Workspace.doorleft.l22.CFrame * CFrame.new(0.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0) game.Workspace.doorleft.l23.CFrame = game.Workspace.doorleft.l23.CFrame * CFrame.new(0.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0) game.Workspace.doorleft.l31.CFrame = game.Workspace.doorleft.l31.CFrame * CFrame.new(0.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0) game.Workspace.doorleft.l32.CFrame = game.Workspace.doorleft.l32.CFrame * CFrame.new(0.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0) game.Workspace.doorleft.l33.CFrame = game.Workspace.doorleft.l33.CFrame * CFrame.new(0.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0) game.Workspace.doorleft.l41.CFrame = game.Workspace.doorleft.l41.CFrame * CFrame.new(0.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0) game.Workspace.doorleft.l42.CFrame = game.Workspace.doorleft.l42.CFrame * CFrame.new(0.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0) game.Workspace.doorleft.l43.CFrame = game.Workspace.doorleft.l43.CFrame * CFrame.new(0.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0) game.Workspace.doorleft.l51.CFrame = game.Workspace.doorleft.l51.CFrame * CFrame.new(0.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0) game.Workspace.doorleft.l52.CFrame = game.Workspace.doorleft.l52.CFrame * CFrame.new(0.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0) game.Workspace.doorleft.l53.CFrame = game.Workspace.doorleft.l53.CFrame * CFrame.new(0.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0) game.Workspace.doorleft.l61.CFrame = game.Workspace.doorleft.l61.CFrame * CFrame.new(0.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0) game.Workspace.doorleft.l62.CFrame = game.Workspace.doorleft.l62.CFrame * CFrame.new(0.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0) game.Workspace.doorleft.l63.CFrame = game.Workspace.doorleft.l63.CFrame * CFrame.new(0.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0) game.Workspace.doorleft.l71.CFrame = game.Workspace.doorleft.l71.CFrame * CFrame.new(0.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0) game.Workspace.doorleft.l72.CFrame = game.Workspace.doorleft.l72.CFrame * CFrame.new(0.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0) game.Workspace.doorleft.l73.CFrame = game.Workspace.doorleft.l73.CFrame * CFrame.new(0.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0)
--[=[ Returns a new Promise that resolves if the chained Promise resolves within `seconds` seconds, or rejects if execution time exceeds `seconds`. The chained Promise will be cancelled if the timeout is reached. Rejects with `rejectionValue` if it is non-nil. If a `rejectionValue` is not given, it will reject with a `Promise.Error(Promise.Error.Kind.TimedOut)`. This can be checked with [[Error.isKind]]. ```lua getSomething():timeout(5):andThen(function(something) -- got something and it only took at max 5 seconds end):catch(function(e) -- Either getting something failed or the time was exceeded. if Promise.Error.isKind(e, Promise.Error.Kind.TimedOut) then warn("Operation timed out!") else warn("Operation encountered an error!") end end) ``` Sugar for: ```lua Promise.race({ Promise.delay(seconds):andThen(function() return Promise.reject( rejectionValue == nil and Promise.Error.new({ kind = Promise.Error.Kind.TimedOut }) or rejectionValue ) end), promise }) ``` @param seconds number @param rejectionValue? any -- The value to reject with if the timeout is reached @return Promise ]=]
function Promise.prototype:timeout(seconds, rejectionValue) local traceback = debug.traceback(nil, 2) return Promise.race({ Promise.delay(seconds):andThen(function() return Promise.reject(rejectionValue == nil and Error.new({ kind = Error.Kind.TimedOut, error = "Timed out", context = string.format( "Timeout of %d seconds exceeded.\n:timeout() called at:\n\n%s", seconds, traceback ), }) or rejectionValue) end), self, }) end
--[ Hooks ]-- -- Controls
Mouse.KeyDown:connect(function(Key) if (Hold ~= nil) then return end if (string.upper(Key) ~= "C") and (string.lower(Key) ~= " ") then return end Hold = true if (Torso:FindFirstChild("LegWeld") == nil) and (string.lower(Key) ~= " ") then -- Right Leg RH.Part1 = nil CreateWeld(RL, CFrame.new(-0.5, 0.75, 1)) -- Left Leg LH.Part1 = nil CreateWeld(LL, CFrame.new(0.5, 0.495, 1.25) * CFrame.Angles(math.rad(90), 0, 0)) -- Lower Character RJ.C0 = CFrame.new(0, -1.25, 0) * CFrame.Angles(0, 0, 0) RJ.C1 = CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0) -- Slow Walk Speed Humanoid.CameraOffset = Vector3.new(0, -1.25, 0) Humanoid.WalkSpeed = 8 else StandUp() Humanoid.WalkSpeed = 16 if Humanoid.CameraOffset == Vector3.new(0,1.25,0) then Humanoid.CameraOffset = Vector3.new(0, 0, 0) Humanoid.WalkSpeed = 16 end end wait(0.5) Hold = nil end)
--[[ CameraShakePresets.Bump CameraShakePresets.Explosion CameraShakePresets.Earthquake CameraShakePresets.BadTrip CameraShakePresets.HandheldCamera CameraShakePresets.Vibration CameraShakePresets.RoughDriving --]]
local CameraShakeInstance = require(script.Parent.CameraShakeInstance) local CameraShakePresets = { -- A high-magnitude, short, yet smooth shake. -- Should happen once. Bump = function() local c = CameraShakeInstance.new(2.5, 4, 0.1, 0.75) c.PositionInfluence = Vector3.new(0.15, 0.15, 0.15) c.RotationInfluence = Vector3.new(1, 1, 1) return c end; -- An intense and rough shake. -- Should happen once. Explosion = function() local c = CameraShakeInstance.new(5, 10, 0, 1.5) c.PositionInfluence = Vector3.new(0.25, 0.25, 0.25) c.RotationInfluence = Vector3.new(4, 1, 1) return c end; -- A continuous, rough shake -- Sustained. Earthquake = function() local c = CameraShakeInstance.new(0.6, 3.5, 2, 10) c.PositionInfluence = Vector3.new(0.25, 0.25, 0.25) c.RotationInfluence = Vector3.new(1, 1, 4) return c end; -- A bizarre shake with a very high magnitude and low roughness. -- Sustained. BadTrip = function() local c = CameraShakeInstance.new(10, 0.15, 5, 10) c.PositionInfluence = Vector3.new(0, 0, 0.15) c.RotationInfluence = Vector3.new(2, 1, 4) return c end; -- A subtle, slow shake. -- Sustained. HandheldCamera = function() local c = CameraShakeInstance.new(1, 0.25, 5, 10) c.PositionInfluence = Vector3.new(0, 0, 0) c.RotationInfluence = Vector3.new(1, 0.5, 0.5) return c end; -- A very rough, yet low magnitude shake. -- Sustained. Vibration = function() local c = CameraShakeInstance.new(0.4, 20, 2, 2) c.PositionInfluence = Vector3.new(0, 0.15, 0) c.RotationInfluence = Vector3.new(1.25, 0, 4) return c end; -- A slightly rough, medium magnitude shake. -- Sustained. RoughDriving = function() local c = CameraShakeInstance.new(1, 2, 1, 1) c.PositionInfluence = Vector3.new(0, 0, 0) c.RotationInfluence = Vector3.new(1, 1, 1) return c end; } return setmetatable({}, { __index = function(t, i) local f = CameraShakePresets[i] if (type(f) == "function") then return f() end error("No preset found with index \"" .. i .. "\"") end; })
--[[Weight and CG]]
Tune.Weight = 1000 -- Total weight (in pounds) Tune.WeightBSize = { -- Size of weight brick (dimmensions in studs ; larger = more stable) --[[Width]] 6 , --[[Height]] 3.5 , --[[Length]] 14 } Tune.WeightDist = 50 -- Weight distribution (0 - on rear wheels, 100 - on front wheels, can be <0 or >100) Tune.CGHeight = .8 -- Center of gravity height (studs relative to median of all wheels) Tune.WBVisible = false -- Makes the weight brick visible --Unsprung Weight Tune.FWheelDensity = .1 -- Front Wheel Density Tune.RWheelDensity = .1 -- Rear Wheel Density Tune.FWLgcyDensity = 1 -- Front Wheel Density [PGS OFF] Tune.RWLgcyDensity = 1 -- Rear Wheel Density [PGS OFF] Tune.AxleSize = 2 -- Size of structural members (larger = more stable/carry more weight) Tune.AxleDensity = .1 -- Density of structural members
--used by checkTeams
function sameTeam(otherHuman) local player = getPlayer() local otherPlayer = game:GetService("Players"):GetPlayerFromCharacter(otherHuman.Parent) if player and otherPlayer then if player == otherPlayer then return true end if otherPlayer.Neutral then return false end return player.TeamColor == otherPlayer.TeamColor end return false end
--edit the function below to return true when you want this response/prompt to be valid --player is the player speaking to the dialogue, and dialogueFolder is the object containing the dialogue data
return function(player, dialogueFolder) local plrData = require(game.ReplicatedStorage.Source.Modules.Util):GetPlayerData(player) if plrData.Character.Injuries.Burned.Value == true then return true end return false end
-- hide the default loading screen
ReplicatedFirst:RemoveDefaultLoadingScreen()
--[[ Calls a function and throws an error if it attempts to yield. Pass any number of arguments to the function after the callback. This function supports multiple return; all results returned from the given function will be returned. ]]
local function resultHandler(co, ok, ...) if not ok then local err = (...) error(err, 2) end if coroutine.status(co) ~= "dead" then error(debug.traceback(co, "Attempted to yield inside Changed event!"), 2) end return ... end local function NoYield(callback, ...) local co = coroutine.create(callback) return resultHandler(co, coroutine.resume(co, ...)) end return NoYield
--NOTE --The animation can bug out, im still trying to find a way to fix that.
repeat wait() until game:IsLoaded() wait(0.01) local TweenService = game:GetService("TweenService") local tweenPart = game.Players.LocalPlayer.Character.Humanoid local info = TweenInfo.new( 0.325, Enum.EasingStyle.Back, Enum.EasingDirection.Out, 0, false, 0 ) local info2 = TweenInfo.new( 0.3, Enum.EasingStyle.Back, Enum.EasingDirection.Out, 0, false, 0 ) local Goals = {CameraOffset = Vector3.new(0,-1.75,0)} local Goals2 = {CameraOffset = Vector3.new(0,0,0)} local animsR6 = script.Parent.Parent.R6Anims local animsR15 = script.Parent.Parent.R15Anims local PartTween = TweenService:Create(tweenPart, info, Goals) local PartTween2 = TweenService:Create(tweenPart, info2, Goals2) local animidle = tweenPart:LoadAnimation(animsR15.Idle) local animwalk = tweenPart:LoadAnimation(animsR15.Walk) if tweenPart.RigType == Enum.HumanoidRigType.R6 then animidle = tweenPart:LoadAnimation(animsR6.Idle) animwalk = tweenPart:LoadAnimation(animsR6.Walk) elseif tweenPart.RigType == Enum.HumanoidRigType.R15 then animidle = tweenPart:LoadAnimation(animsR15.Idle) animwalk = tweenPart:LoadAnimation(animsR15.Walk) end local crouching = false local waiting = false local function Crouch() if waiting == false then if crouching == false then script.Parent.Parent.ImageColor3 = script.Parent.Parent.Values.OnCrouchColor.Value script.Parent.Parent.CrouchImage.ImageColor3 = Color3.new(1, 1, 1) tweenPart.WalkSpeed = 8 waiting = true crouching = true animidle:Play() PartTween:Play() --plays it tweenPart.Running:Connect(function(Speed) if crouching == true then if Speed >= 1 then animidle:Stop() if animwalk.IsPlaying == false then animwalk:Play() end else animidle:Play() animwalk:Stop() end end end) wait(0.05) waiting = false else script.Parent.Parent.ImageColor3 = script.Parent.Parent.Values.OriginalColor.Value script.Parent.Parent.CrouchImage.ImageColor3 = Color3.new(0, 0, 0) tweenPart.WalkSpeed = 16 waiting = true crouching = false animidle:Stop() animwalk:Stop() PartTween2:Play() wait(0.05) waiting = false end end end local userinputservice = game:GetService("UserInputService") userinputservice.InputBegan:Connect(function(input) if script.Parent.Parent.Visible == true then if input.KeyCode == Enum.KeyCode.LeftControl then Crouch() end end end) script.Parent.Parent.MouseButton1Click:Connect(function() Crouch() end)
--[[Engine]]
--Torque Curve Tune.Horsepower = 265 -- [TORQUE CURVE VISUAL] Tune.IdleRPM = 700 -- https://www.desmos.com/calculator/2uo3hqwdhf Tune.PeakRPM = 6980 -- Use sliders to manipulate values Tune.Redline = 8000 -- Copy and paste slider values into the respective tune values Tune.EqPoint = 5500 Tune.PeakSharpness = 7.5 Tune.CurveMult = 0.16 --Incline Compensation Tune.InclineComp = 1.7 -- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees) --Misc Tune.RevAccel = 150 -- RPM acceleration when clutch is off Tune.RevDecay = 75 -- RPM decay when clutch is off Tune.RevBounce = 500 -- RPM kickback from redline Tune.IdleThrottle = 3 -- Percent throttle at idle Tune.ClutchTol = 500 -- Clutch engagement threshold (higher = faster response)
-- ROBLOX deviation: IndexedCall annotated as any for now since we don't have tuple support in luau
type IndexedCall = any function printReceivedCallsNegative( expected: Array<any>, indexedCalls: Array<IndexedCall>, isOnlyCall: boolean, iExpectedCall: number? ) if #indexedCalls == 0 then return "" end local label = "Received: " if isOnlyCall then return label .. printReceivedArgs(indexedCalls[1], expected) .. "\n" end local printAligned = getRightAlignedPrinter(label) return "Received\n" .. Array.reduce(indexedCalls, function(printed: string, iCall: IndexedCall) local i = iCall[1] local args = iCall[2] return printed .. printAligned(tostring(i), i == iExpectedCall) .. printReceivedArgs(args, expected) .. "\n" end, "") end function printExpectedReceivedCallsPositive( expected: Array<any>, indexedCalls: Array<IndexedCall>, expand: boolean, isOnlyCall: boolean, iExpectedCall: number? ) local expectedLine = string.format("Expected: %s\n", printExpectedArgs(expected)) if #indexedCalls == 0 then return expectedLine end local label = "Received: " if isOnlyCall and (iExpectedCall == 1 or iExpectedCall == nil) then local received = indexedCalls[1][2] if isLineDiffableCall(expected, received) then -- Display diff without indentation. local lines = { EXPECTED_COLOR("- Expected"), RECEIVED_COLOR("+ Received"), "", } local length = math.max(#expected, #received) for i = 1, length do local added = false if i <= #expected and i <= #received then if isEqualValue(expected[i], received[i]) then table.insert(lines, " " .. printCommon(received[i]) .. ",") added = true end if not added and isLineDiffableArg(expected[i], received[i]) then local difference = diff(expected[i], received[i], { expand }) if typeof(difference) == "string" and difference:find("%- Expected") and difference:find("%+ Received") then -- Omit annotation in case multiple args have diff. local splitLines = {} for s in difference:gmatch("[^\n]+") do table.insert(splitLines, s) end splitLines = Array.slice(splitLines, 3) table.insert(lines, Array.join(splitLines, "\n") .. ",") added = true end end end if not added then if i <= #expected then table.insert(lines, EXPECTED_COLOR("- " .. stringify(expected[i])) .. ",") end if i <= #received then table.insert(lines, RECEIVED_COLOR("+ " .. stringify(received[i])) .. ",") end end i = i + 1 end return table.concat(lines, "\n") .. "\n" end return expectedLine .. label .. printReceivedArgs(received, expected) .. "\n" end local printAligned = getRightAlignedPrinter(label) return expectedLine .. "Received\n" .. Array.reduce(indexedCalls, function(printed: string, indexedCall: IndexedCall) local i = indexedCall[1] local received = indexedCall[2] local aligned = printAligned(tostring(i), i == iExpectedCall) if (i == iExpectedCall or iExpectedCall == nil) and isLineDiffableCall(expected, received) then return printed .. aligned:sub(1, aligned:find(":") - 1) .. "\n" .. aligned:sub(aligned:find(":") + 1, #aligned) .. printDiffCall(expected, received, expand) .. "\n" else return printed .. aligned .. printReceivedArgs(received, expected) .. "\n" end end, "") end local indentation = string.gsub("Received", "[a-zA-Z0-9_]", " ") function printDiffCall(expected: Array<any>, received: Array<any>, expand: boolean) return Array.join( Array.map(received, function(arg, i) if i <= #expected then if isEqualValue(expected[i], arg) then return indentation .. " " .. printCommon(arg) .. "," end if isLineDiffableArg(expected[i], arg) then local difference = diff(expected[i], arg, { expand = expand }) if typeof(difference) == "string" and difference:find("%- Expected") and difference:find("%+ Received") then -- Display diff with indentation. -- Omit annotation in case multiple args have diff. local splitLines = {} for s in difference:gmatch("[^\n]+") do table.insert(splitLines, s) end return Array.join( Array.map(Array.slice(splitLines, 3), function(line) return indentation .. line end), "\n" ) .. "," end end end -- Display + only if received arg has no corresponding expected arg. return indentation .. (function() if i <= #expected then return " " .. printReceived(arg) end return RECEIVED_COLOR("+ " .. stringify(arg)) end)() .. "," end), "\n" ) end function isLineDiffableCall(expected: Array<any>, received: Array<any>): boolean return Array.some(expected, function(arg, i) return i <= #received and isLineDiffableArg(arg, received[i]) end) end
--("found vehicle gui - deleting")
gui = pl.PlayerGui:findFirstChild("VehicleGui") gui:Destroy() newscript = script.Parent.camfix:Clone() newscript.Parent = pl.PlayerGui script.Parent.Parent.HasGunner.Value = false
-- connect events
Humanoid.Died:connect(onDied) Humanoid.Running:connect(onRunning) Humanoid.Jumping:connect(onJumping) Humanoid.Climbing:connect(onClimbing) Humanoid.GettingUp:connect(onGettingUp) Humanoid.FreeFalling:connect(onFreeFall) Humanoid.FallingDown:connect(onFallingDown) Humanoid.Seated:connect(onSeated) Humanoid.PlatformStanding:connect(onPlatformStanding) Humanoid.Swimming:connect(onSwimming) local runService = game:GetService("RunService"); playAnimation("idle", 0.1, Humanoid) pose = "Standing" while wait(0)do local _,time=wait(0) move(time) end
-- If you want to know how to retexture a hat, read this: http://www.roblox.com/Forum/ShowPost.aspx?PostID=10502388
debounce = true function onTouched(hit) if (hit.Parent:findFirstChild("Humanoid") ~= nil and debounce == true) then debounce = false h = Instance.new("Hat") p = Instance.new("Part") h.Name = "Hat" -- It doesn't make a difference, but if you want to make your place in Explorer neater, change this to the name of your hat. p.Parent = h p.Position = hit.Parent:findFirstChild("Head").Position p.Name = "Handle" p.formFactor = 0 p.Size = Vector3.new(-0,-0,-1) p.BottomSurface = 0 p.TopSurface = 0 p.Locked = true script.Parent.Mesh:clone().Parent = p h.Parent = hit.Parent h.AttachmentPos = Vector3.new(1, 0.56, -0.3) -- Change these to change the positiones of your hat, as I said earlier. wait(5) debounce = true end end script.Parent.Touched:connect(onTouched)
-- Splits a uint32 number into four bytes.
function common.uint32_to_bytes(a) local a4 = a % 256 a = (a - a4) / 256 local a3 = a % 256 a = (a - a3) / 256 local a2 = a % 256 local a1 = (a - a2) / 256 return a1, a2, a3, a4 end return common
-------- OMG HAX
r = game:service("RunService") local damage = 0 local slash_damage = 0 sword = script.Parent.Handle Tool = script.Parent function attack() local anim = Instance.new("StringValue") anim.Name = "toolanim" anim.Value = "Slash" anim.Parent = Tool end function swordUp() Tool.GripForward = Vector3.new(-1,0,0) Tool.GripRight = Vector3.new(0,1,0) Tool.GripUp = Vector3.new(0,0,1) end function swordOut() Tool.GripForward = Vector3.new(0,0,1) Tool.GripRight = Vector3.new(0,-1,0) Tool.GripUp = Vector3.new(-1,0,0) end Tool.Enabled = true function onActivated() if not Tool.Enabled then return end Tool.Enabled = false local character = Tool.Parent; local humanoid = character.Humanoid if humanoid == nil then print("Humanoid not found") return end attack() wait(1) Tool.Enabled = true end function onEquipped() end script.Parent.Activated:connect(onActivated) script.Parent.Equipped:connect(onEquipped)
--Objects
local DriverSeat = Chassis.driverSeat local function unbindActions() ContextActionService:UnbindAction(STEER_LEFT_ACTION_NAME) ContextActionService:UnbindAction(STEER_RIGHT_ACTION_NAME) ContextActionService:UnbindAction(THROTTLE_ACTION_NAME) ContextActionService:UnbindAction(BRAKE_ACTION_NAME) ContextActionService:UnbindAction(HAND_BRAKE_ACTION_NAME) ContextActionService:UnbindAction(EXIT_ACTION_NAME) end local function onExitSeat(Seat) unbindActions() LocalVehicleSeating.DisconnectFromSeatExitEvent(onExitSeat) script.Disabled = true end LocalVehicleSeating.OnSeatExitEvent(onExitSeat)
--local Player --local Character --local Humanoid
local Module = require(Tool:WaitForChild("Setting")) local ChangeMagAndAmmo = script:WaitForChild("ChangeMagAndAmmo") local Grip2 local Handle2 if Module.DualEnabled then Handle2 = Tool:WaitForChild("Handle2",1) if Handle2 == nil and Module.DualEnabled then error("\"Dual\" setting is enabled but \"Handle2\" is missing!") end end local MagValue = script:FindFirstChild("Mag") or Instance.new("NumberValue",script) MagValue.Name = "Mag" MagValue.Value = Module.AmmoPerMag local AmmoValue = script:FindFirstChild("Ammo") or Instance.new("NumberValue",script) AmmoValue.Name = "Ammo" AmmoValue.Value = Module.LimitedAmmoEnabled and Module.Ammo or 0 if Module.IdleAnimationID ~= nil or Module.DualEnabled then local IdleAnim = Instance.new("Animation",Tool) IdleAnim.Name = "IdleAnim" IdleAnim.AnimationId = "rbxassetid://"..(Module.DualEnabled and 53610688 or Module.IdleAnimationID) end if Module.FireAnimationID ~= nil then local FireAnim = Instance.new("Animation",Tool) FireAnim.Name = "FireAnim" FireAnim.AnimationId = "rbxassetid://"..Module.FireAnimationID end if Module.ReloadAnimationID ~= nil then local ReloadAnim = Instance.new("Animation",Tool) ReloadAnim.Name = "ReloadAnim" ReloadAnim.AnimationId = "rbxassetid://"..Module.ReloadAnimationID end if Module.ShotgunClipinAnimationID ~= nil then local ShotgunClipinAnim = Instance.new("Animation",Tool) ShotgunClipinAnim.Name = "ShotgunClipinAnim" ShotgunClipinAnim.AnimationId = "rbxassetid://"..Module.ShotgunClipinAnimationID end if Module.HoldDownAnimationID ~= nil then local HoldDownAnim = Instance.new("Animation",Tool) HoldDownAnim.Name = "HoldDownAnim" HoldDownAnim.AnimationId = "rbxassetid://"..Module.HoldDownAnimationID end if Module.EquippedAnimationID ~= nil then local EquippedAnim = Instance.new("Animation",Tool) EquippedAnim.Name = "EquippedAnim" EquippedAnim.AnimationId = "rbxassetid://"..Module.EquippedAnimationID end ChangeMagAndAmmo.OnServerEvent:connect(function(Player,Mag,Ammo) MagValue.Value = Mag AmmoValue.Value = Ammo end) Tool.Equipped:connect(function() --Player = game.Players:GetPlayerFromCharacter(Tool.Parent) --Character = Tool.Parent --Humanoid = Character:FindFirstChild("Humanoid") if Module.DualEnabled and workspace.FilteringEnabled then Handle2.CanCollide = false local LeftArm = Tool.Parent:FindFirstChild("Left Arm") or Tool.Parent:FindFirstChild("LeftHand") local RightArm = Tool.Parent:FindFirstChild("Right Arm") or Tool.Parent:FindFirstChild("RightHand") if RightArm then local Grip = RightArm:WaitForChild("RightGrip",0.01) if Grip then Grip2 = Grip:Clone() Grip2.Name = "LeftGrip" Grip2.Part0 = LeftArm Grip2.Part1 = Handle2 --Grip2.C1 = Grip2.C1:inverse() Grip2.Parent = LeftArm end end end end) Tool.Unequipped:connect(function() if Module.DualEnabled and workspace.FilteringEnabled then Handle2.CanCollide = true if Grip2 then Grip2:Destroy() end end end)
--Dont mess with any of this
function boop(Player) if not Player.Backpack:FindFirstChild(Toolname) then local Tool = game.ServerStorage[Toolname]:clone() Tool.Parent = Player.Backpack script.Parent.ClickDetector.MaxActivationDistance = 0 game.Workspace.Crowbarmod.Transparency = 1 wait(100) game.Workspace.Crowbarmod.Transparency = 0 script.Parent.ClickDetector.MaxActivationDistance = 5 end end script.Parent.ClickDetector.MouseClick:connect(boop)
-- InspiringNote's free to use rank GUI/script.
local groupID = 16072157 -- Put your Group ID here! game.Players.PlayerAdded:Connect(function(player) local groupRank = player:GetRoleInGroup(groupID) local clone = script.Rank:Clone() clone.Parent = game.Workspace:WaitForChild(player.Name).Head clone.Frame.Name1.Text = player.Name clone.Frame.Rank.Text = groupRank player.CharacterAdded:Connect(function() local groupRank = player:GetRoleInGroup(groupID) local clone = script.Rank:Clone() clone.Parent = game.Workspace:WaitForChild(player.Name).Head clone.Frame.Name1.Text = player.Name clone.Frame.Rank.Text = groupRank end) end)
--//D//--
if gear.Value == 1 then if script.Parent.TC.On.Value == true then if carSeat.Throttle == 1 and script.Parent.CC.Value == true then rwd.Torque = 0 lwd.Torque = 0 rrwd.Torque = 0 rwd.Throttle = 0 lwd.Throttle = 0 rrwd.Throttle = 0 elseif carSeat.Throttle == 1 and script.Parent.CC.Value == false then rwd.Throttle = 0 rwd.Torque = 0 rwd.MaxSpeed = maxspeed lwd.Throttle = 0 lwd.Torque = 0 lwd.MaxSpeed = maxspeed rrwd.Throttle = 0 rrwd.Torque = 0 rrwd.MaxSpeed = maxspeed elseif carSeat.Throttle == -1 then script.Parent.CC.Value = false rb.RB.CanCollide = true rb.FB.CanCollide = true lfb.RB.CanCollide = true lfb.FB.CanCollide = true rfb.RB.CanCollide = true rfb.FB.CanCollide = true wait(brakes) rb.RB.CanCollide = false rb.FB.CanCollide = false lfb.RB.CanCollide = false lfb.FB.CanCollide = false rfb.RB.CanCollide = false rfb.FB.CanCollide = false wait() elseif carSeat.Throttle == 0 and script.Parent.CC.Value == true then rb.RB.CanCollide = false rb.FB.CanCollide = false lfb.RB.CanCollide = false lfb.FB.CanCollide = false rfb.RB.CanCollide = false rfb.FB.CanCollide = false elseif carSeat.Throttle == 0 and script.Parent.CC.Value == false then rwd.Throttle = 0 rwd.Torque = cst rwd.MaxSpeed = maxspeed lwd.Throttle = 0 lwd.Torque = cst lwd.MaxSpeed = maxspeed rrwd.Throttle = 0 rrwd.Torque = cst rrwd.MaxSpeed = maxspeed rb.RB.CanCollide = false rb.FB.CanCollide = false lfb.RB.CanCollide = false lfb.FB.CanCollide = false rfb.RB.CanCollide = false rfb.FB.CanCollide = false end end if script.Parent.TC.On.Value == false then if carSeat.Throttle == 1 and script.Parent.CC.Value == true then rwd.Torque = tq lwd.Torque = ftq rrwd.Torque = ftq rwd.Throttle = 1 lwd.Throttle = 1 rrwd.Throttle = 1 elseif carSeat.Throttle == 1 and script.Parent.CC.Value == false then rwd.Throttle = 1 rwd.Torque = tq rwd.MaxSpeed = maxspeed lwd.Throttle = 1 lwd.Torque = ftq lwd.MaxSpeed = maxspeed rrwd.Throttle = 1 rrwd.Torque = ftq rrwd.MaxSpeed = maxspeed elseif carSeat.Throttle == -1 then script.Parent.CC.Value = false rb.RB.CanCollide = true rb.FB.CanCollide = true lfb.RB.CanCollide = true lfb.FB.CanCollide = true rfb.RB.CanCollide = true rfb.FB.CanCollide = true wait(brakes) rb.RB.CanCollide = false rb.FB.CanCollide = false lfb.RB.CanCollide = false lfb.FB.CanCollide = false rfb.RB.CanCollide = false rfb.FB.CanCollide = false wait() elseif carSeat.Throttle == 0 and script.Parent.CC.Value == true then rb.RB.CanCollide = false rb.FB.CanCollide = false lfb.RB.CanCollide = false lfb.FB.CanCollide = false rfb.RB.CanCollide = false rfb.FB.CanCollide = false elseif carSeat.Throttle == 0 and script.Parent.CC.Value == false then rwd.Throttle = 0 rwd.Torque = cst rwd.MaxSpeed = maxspeed lwd.Throttle = 0 lwd.Torque = cst lwd.MaxSpeed = maxspeed rrwd.Throttle = 0 rrwd.Torque = cst rrwd.MaxSpeed = maxspeed rb.RB.CanCollide = false rb.FB.CanCollide = false lfb.RB.CanCollide = false lfb.FB.CanCollide = false rfb.RB.CanCollide = false rfb.FB.CanCollide = false end end end
-- Decompiled with the Synapse X Luau decompiler.
local l__LocalPlayer__1 = game.Players.LocalPlayer; local v2 = {}; local l__LocalPlayer__3 = game.Players.LocalPlayer; local v4 = require(game:GetService("ReplicatedStorage"):WaitForChild("ReplicaDataModule")); v2.value = 250; v2.event = v4.event.Knobs; v4.event.Knobs.Event:connect(function(p1) if type(p1) == "number" then v2.value = p1; return; end; v2.value = 250; end); v2.value = v4.data.Knobs; return v2;
-- Don't edit if you don't know what you're doing --
local DataStoreService = game:GetService("DataStoreService") local DataStore = DataStoreService:GetOrderedDataStore("GlobalLeaderboard_" .. StatsName) local SurfaceGui = script.Parent local Sample = script.Sample local List = SurfaceGui.Frame.List local ItemsFrame = List.ListContent.Items local function GetItems() local Data = DataStore:GetSortedAsync(false, MaxItems, MinValueDisplay, MaxValueDisplay) local TopPage = Data:GetCurrentPage() ItemsFrame.Nothing.Visible = #TopPage == 0 and true or false for i, v in ipairs(TopPage) do local UserId = v.key local Value = v.value local Username = "[Not Available]" local Color = Color3.fromRGB(38, 50, 56) local Success, Error = pcall(function() Username = game.Players:GetNameFromUserIdAsync(UserId) end) if i == 1 then Color = Color3.fromRGB(255, 215, 0) elseif i == 2 then Color = Color3.fromRGB(192, 192, 192) elseif i == 3 then Color = Color3.fromRGB(205, 127, 50) end local Item = Sample:Clone() Item.Name = Username Item.LayoutOrder = i Item.Values.Number.TextColor3 = Color Item.Values.Number.Text = i Item.Values.Username.Text = Username Item.Values.Value.Text = Value Item.Parent = ItemsFrame end end while true do for i, v in pairs(game.Players:GetPlayers()) do local Stats = v.leaderstats:WaitForChild(StatsName).Value if Stats then pcall(function() DataStore:UpdateAsync(v.UserId, function(Value) return tonumber(Stats) end) end) end end for i, v in pairs(ItemsFrame:GetChildren()) do if v:IsA("ImageLabel") then v:Destroy() end end GetItems() wait() SurfaceGui.Heading.Heading.Text = StatsName .. " Leaderboard" List.ListContent.GuideTopBar.Value.Text = StatsName List.CanvasSize = UDim2.new(0, 0, 0, ItemsFrame.UIListLayout.AbsoluteContentSize.Y + 35) wait(UpdateEvery) end
-- Helpers to patch console.logs to avoid logging during side-effect free -- replaying on render function. This currently only patches the object -- lazily which won't cover if the log function was extracted eagerly. -- We could also eagerly patch the method.
local disabledDepth = 0 local prevLog local prevInfo local prevWarn local prevError local prevGroup local prevGroupCollapsed local prevGroupEnd local disabledLog = function() end local exports = {}
--[[ 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
-- if Zdir < 0 then -- Get closest 45 degree angle. Diagonal. -- Zdag = -RAYLength -- else -- Zdag = RAYLength -- end -- if Xdir < 0 then -- Xdag = -RAYLength -- else -- Xdag = RAYLength -- end
if math.abs(Xdir) > math.abs(Zdir) then -- Ordinal. if Xdir < 0 then Xdir = -RAYLength -- convert to our direction indicator. else Xdir = RAYLength end Zdag = Xdir -- Diagonal Right. Xdag = Xdir Zdir = 0 else -- abs if Zdir < 0 then Zdir = -RAYLength else Zdir = RAYLength end Zdag = Zdir Xdag = -Zdir Xdir = 0 end -- abs end -- GetDir while AItorso do -- while I still have a body; search. torsoPos = AItorso.Position local targ = Workspace.Terrain -- Temp targ local Distance =(torsoPos - OldPos).magnitude -- Distance traveled, since last loop
--[[ APICharacterState Description: This simple API is to get the character state instance of your local player. The character state is an object that stores some flags that determine if your player is crouched, aiming, shooting, or sprinting. These flags are vital for state machines that need to make sure the character enters a state without conflicting with specifc flags. ]]
local APICharacterState = {}
-- ScreenSpace -> WorldSpace. Taking a screen height, and a depth to put an object -- at, and returning a size of how big that object has to be to appear that size -- at that depth.
function ScreenSpace.ScreenToWorldByHeightDepth(x, y, screenHeight, depth) local aspectRatio = ScreenSpace.AspectRatio() local hfactor = math.tan(math.rad(workspace.CurrentCamera.FieldOfView)/2) local wfactor = aspectRatio*hfactor local sx, sy = ScreenSpace.ViewSizeX(), ScreenSpace.ViewSizeY() -- local worldHeight = -(screenHeight/sy) * 2 * hfactor * depth -- local xf, yf = x/sx*2 - 1, y/sy*2 - 1 local xpos = xf * -wfactor * depth local ypos = yf * hfactor * depth -- return Vector3.new(xpos, ypos, depth), worldHeight end
-- regeneration
while true do local s = wait(0.01) local health = Humanoid.Health if health > 0 and health < Humanoid.MaxHealth then health = health + 0.1 * s * Humanoid.MaxHealth if health * 1.05 < Humanoid.MaxHealth then Humanoid.Health = health else Humanoid.Health = Humanoid.MaxHealth end end end
-- Main LEDs
function AlarmFlash() if aflash then return end aflash = true while alarmpiezo do trans.AlarmLED.BrickColor = BrickColor.new("Really red") wait(0.1) trans.AlarmLED.BrickColor = BrickColor.new("Mid gray") wait(0.1) end aflash = false if #system.ActiveAlarms:GetChildren() > 0 then trans.AlarmLED.BrickColor = BrickColor.new("Really red") end end function TroFlash() if tflash then return end tflash = true while tropiezo do trans.TroubleLED.BrickColor = BrickColor.new("Deep orange") wait(0.1) trans.TroubleLED.BrickColor = BrickColor.new("Mid gray") wait(0.1) end tflash = false if #system.Troubles:GetChildren() > 0 then trans.TroubleLED.BrickColor = BrickColor.new("Deep orange") end end function ResetLED() if system.Reset.Value == false then return end trans.Sounder.T3.Disabled = true trans.Sounder.TR.Disabled = true alarmpiezo = false tropiezo = false while system.Reset.Value == true do trans.AlarmLED.BrickColor = BrickColor.new("Really red") trans.TroubleLED.BrickColor = BrickColor.new("Deep orange") trans.SilencedLED.BrickColor = BrickColor.new("Deep orange") wait() end trans.AlarmLED.BrickColor = BrickColor.new("Mid gray") trans.TroubleLED.BrickColor = BrickColor.new("Mid gray") trans.SilencedLED.BrickColor = BrickColor.new("Mid gray") CheckForAlarmAck() CheckForTroAck() end system.Reset.Changed:connect(ResetLED) function CheckForAlarmAck() local af = system.ActiveAlarms:GetChildren() local aack = true for i = 1, #af do if af[i]:findFirstChild("Ack")==nil then aack = false end end if aack then alarmpiezo = false else alarmpiezo = true end if alarmpiezo then trans.Sounder.T3.Disabled = false trans.Sounder.TR.Disabled = true elseif tropiezo then trans.Sounder.T3.Disabled = true trans.Sounder.TR.Disabled = false elseif alarmpiezo == false and tropiezo == false then trans.Sounder.T3.Disabled = true trans.Sounder.TR.Disabled = true end AlarmFlash() TroFlash() end function CheckForTroAck() local tf = system.Troubles:GetChildren() local tack = true for i = 1, #tf do if tf[i]:findFirstChild("Ack")==nil then tack = false end end if tack then tropiezo = false else tropiezo = true end if alarmpiezo then trans.Sounder.T3.Disabled = false trans.Sounder.TR.Disabled = true elseif tropiezo then trans.Sounder.T3.Disabled = true trans.Sounder.TR.Disabled = false elseif alarmpiezo == false and tropiezo == false then trans.Sounder.T3.Disabled = true trans.Sounder.TR.Disabled = true end AlarmFlash() TroFlash() if #tf==0 then trans.TroubleLED.BrickColor = BrickColor.new("Mid gray") end end function NewAlarm(na) alarmpiezo = true na.ChildAdded:connect(function() CheckForAlarmAck() end) if alarmpiezo then trans.Sounder.T3.Disabled = false trans.Sounder.TR.Disabled = true elseif tropiezo then trans.Sounder.T3.Disabled = true trans.Sounder.TR.Disabled = false elseif alarmpiezo == false and tropiezo == false then trans.Sounder.T3.Disabled = true trans.Sounder.TR.Disabled = true end AlarmFlash() TroFlash() end system.ActiveAlarms.ChildAdded:connect(NewAlarm) system.ActiveAlarms.ChildRemoved:connect(CheckForAlarmAck) function NewTrouble(nt) tropiezo = true nt.ChildAdded:connect(function() CheckForTroAck() end) if alarmpiezo then trans.Sounder.T3.Disabled = false trans.Sounder.TR.Disabled = true elseif tropiezo then trans.Sounder.T3.Disabled = true trans.Sounder.TR.Disabled = false elseif alarmpiezo == false and tropiezo == false then trans.Sounder.T3.Disabled = true trans.Sounder.TR.Disabled = true end AlarmFlash() TroFlash() end system.Troubles.ChildAdded:connect(NewTrouble) system.Troubles.ChildRemoved:connect(CheckForTroAck) system.Silence.Changed:connect(function() if system.Silence.Value == true then trans.SilencedLED.BrickColor = BrickColor.new("Deep orange") else trans.SilencedLED.BrickColor = BrickColor.new("Mid gray") end end)
--Char stats stuffs
local charStats = char.CharStats local downedVal = charStats.Downed local mouseHoverObjectVal = charStats.MouseHoverObject local holdingInputVal = mouseHoverObjectVal.HoldingInput local equippedGunIndexVal = charStats.EquippedGunIndex
--("IsAPlayer")
if pl.PlayerGui:findFirstChild("VehicleGui")~=nil then
-------------------- End JSON Parser ------------------------
t.DecodeJSON = function(jsonString) pcall(function() warn("RbxUtility.DecodeJSON is deprecated, please use Game:GetService('HttpService'):JSONDecode() instead.") end) if type(jsonString) == "string" then return Decode(jsonString) end print("RbxUtil.DecodeJSON expects string argument!") return nil end t.EncodeJSON = function(jsonTable) pcall(function() warn("RbxUtility.EncodeJSON is deprecated, please use Game:GetService('HttpService'):JSONEncode() instead.") end) return Encode(jsonTable) end
-------------------------
function onClicked() R.BrickColor = BrickColor.new("Really red") C.One.BrickColor = BrickColor.new("Really black") C.Two.BrickColor = BrickColor.new("Really black") C.Three.BrickColor = BrickColor.new("Really black") C.Four.BrickColor = BrickColor.new("Really black") C.A.BrickColor = BrickColor.new("Really black") C.B.BrickColor = BrickColor.new("Really black") C.M.BrickColor = BrickColor.new("Really black") end script.Parent.ClickDetector.MouseClick:connect(onClicked)
------------------------------------------------------------------------ -- search the local variable namespace of the given fs for a match -- * used only in singlevaraux() ------------------------------------------------------------------------
function luaY:searchvar(fs, n) for i = fs.nactvar - 1, 0, -1 do if n == self:getlocvar(fs, i).varname then return i end end return -1 -- not found end
--[[ Functions overridden from BaseCamera ]]
-- function LegacyCamera:SetCameraToSubjectDistance(desiredSubjectDistance) return BaseCamera.SetCameraToSubjectDistance(self,desiredSubjectDistance) end function LegacyCamera:Update(dt) -- Cannot update until cameraType has been set if not self.cameraType then return end local now = tick() local timeDelta = (now - self.lastUpdate) local camera = workspace.CurrentCamera local newCameraCFrame = camera.CFrame local newCameraFocus = camera.Focus local player = PlayersService.LocalPlayer if self.lastUpdate == nil or timeDelta > 1 then self.lastDistanceToSubject = nil end local subjectPosition = self:GetSubjectPosition() if self.cameraType == Enum.CameraType.Fixed then if self.lastUpdate then -- Cap out the delta to 0.1 so we don't get some crazy things when we re-resume from local delta = math.min(0.1, now - self.lastUpdate) local gamepadRotation = self:UpdateGamepad() self.rotateInput = self.rotateInput + (gamepadRotation * delta) end if subjectPosition and player and camera then local distanceToSubject = self:GetCameraToSubjectDistance() local newLookVector = self:CalculateNewLookVector() self.rotateInput = ZERO_VECTOR2 newCameraFocus = camera.Focus -- Fixed camera does not change focus newCameraCFrame = CFrame.new(camera.CFrame.p, camera.CFrame.p + (distanceToSubject * newLookVector)) end elseif self.cameraType == Enum.CameraType.Attach then if subjectPosition and camera then local distanceToSubject = self:GetCameraToSubjectDistance() local humanoid = self:GetHumanoid() if self.lastUpdate and humanoid and humanoid.RootPart then -- Cap out the delta to 0.1 so we don't get some crazy things when we re-resume from local delta = math.min(0.1, now - self.lastUpdate) local gamepadRotation = self:UpdateGamepad() self.rotateInput = self.rotateInput + (gamepadRotation * delta) local forwardVector = humanoid.RootPart.CFrame.lookVector local y = Util.GetAngleBetweenXZVectors(forwardVector, self:GetCameraLookVector()) if Util.IsFinite(y) then -- Preserve vertical rotation from user input self.rotateInput = Vector2.new(y, self.rotateInput.Y) end end local newLookVector = self:CalculateNewLookVector() self.rotateInput = ZERO_VECTOR2 newCameraFocus = CFrame.new(subjectPosition) newCameraCFrame = CFrame.new(subjectPosition - (distanceToSubject * newLookVector), subjectPosition) end elseif self.cameraType == Enum.CameraType.Watch then if subjectPosition and player and camera then local cameraLook = nil local humanoid = self:GetHumanoid() if humanoid and humanoid.RootPart then local diffVector = subjectPosition - camera.CFrame.p cameraLook = diffVector.unit if self.lastDistanceToSubject and self.lastDistanceToSubject == self:GetCameraToSubjectDistance() then -- Don't clobber the zoom if they zoomed the camera local newDistanceToSubject = diffVector.magnitude self:SetCameraToSubjectDistance(newDistanceToSubject) end end local distanceToSubject = self:GetCameraToSubjectDistance() local newLookVector = self:CalculateNewLookVector(cameraLook) self.rotateInput = ZERO_VECTOR2 newCameraFocus = CFrame.new(subjectPosition) newCameraCFrame = CFrame.new(subjectPosition - (distanceToSubject * newLookVector), subjectPosition) self.lastDistanceToSubject = distanceToSubject end else -- Unsupported type, return current values unchanged return camera.CFrame, camera.Focus end self.lastUpdate = now return newCameraCFrame, newCameraFocus end return LegacyCamera
-- SERVICES --
local TS = game:GetService("TweenService") local CS = game:GetService("CollectionService") local RS = game:GetService("ReplicatedStorage") local PS = game:GetService("PhysicsService") local UIS = game:GetService("UserInputService") local Players = game:GetService("Players")
-- On Startup -- Start running "autoSave()" function in the background
spawn(autoSave)
--[[* * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. ]]
local exports = {}
---- In order to make this work put the script inside the tool not in the handle just the tool.
--Made by Luckymaxer
Character = script.Parent Humanoid = Character:FindFirstChild("Humanoid") Players = game:GetService("Players") Debris = game:GetService("Debris") BaseUrl = "http://www.roblox.com/asset/?id=" Functions = require(script:WaitForChild("Functions")) DeathEffect = script:FindFirstChild("DeathEffect") Creator = script:FindFirstChild("Creator") DisplayParts = {} Rate = (1 / 60) 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 = 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 DestroyScript() Debris:AddItem(script, 0.5) return end if not Humanoid then DestroyScript() return end Player = Players:GetPlayerFromCharacter(Character) for i = 1, 5 do if Player then Humanoid:UnequipTools() else for i, v in pairs(Character:GetChildren()) do if v:IsA("Tool") then v:Destroy() end end end local Objects = Functions.Redesign(Character) for i, v in pairs(Objects) do v = v.Object if v:IsA("BasePart") then if v.Transparency < 1 then table.insert(DisplayParts, v) end elseif v:IsA("Decal") or v:IsA("Texture") then if v.Transparency < 1 then table.insert(DisplayParts, v) end end end local SameTeam = false UntagHumanoid(Humanoid) if Creator and Creator.Value and Creator.Value.Parent and Creator.Value:IsA("Player") then if not Player or not IsTeamMate(Creator.Value, Player) then TagHumanoid(Humanoid, Creator.Value) else SameTeam = true end end if not SameTeam then Humanoid:TakeDamage(8) if Humanoid.Health <= 0 and DeathEffect then local DeathEffectScript = DeathEffect:Clone() DeathEffectScript.Disabled = false DeathEffectScript.Parent = Character end end if Humanoid.Health > 0 then --wait(0.1) --Delay(0.1, (function() local FadeRate = 2 local FadeAmount = 0.95 for i = 1, ((1 - Functions.DarkProperties.All.Transparency) * (FadeAmount * FadeRate)) do for ii, vv in pairs(DisplayParts) do if vv and vv.Parent then vv.Transparency = (vv.Transparency + (FadeAmount / FadeRate)) end end wait(Rate) end wait(0.5) for i = 1, ((1 - Functions.DarkProperties.All.Transparency) * (FadeAmount * FadeRate)) do for ii, vv in pairs(DisplayParts) do if vv and vv.Parent then vv.Transparency = (vv.Transparency - (FadeAmount / FadeRate)) end end wait(Rate) end for i, v in pairs(Objects) do local Object = v.Object for ii, vv in pairs(v.FakeObjects) do if vv and vv.Parent then vv:Destroy() end end pcall(function() for ii, vv in pairs(v.Properties) do pcall(function() Object[ii] = vv end) end Object.Parent = v.Parent end) end --end)) wait(0.5) end end DestroyScript()
---------------------------------------------------------------------------------------------------- -------------------=[ PROJETIL ]=------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------
,Distance = 10000 ,BDrop = .25 ,BSpeed = 2200 ,SuppressMaxDistance = 25 --- Studs ,SuppressTime = 10 --- Seconds ,BulletWhiz = true ,BWEmitter = 25 ,BWMaxDistance = 200 ,BulletFlare = false ,BulletFlareColor = Color3.fromRGB(255,255,255) ,Tracer = true ,TracerColor = Color3.fromRGB(255,255,255) ,TracerLightEmission = 1 ,TracerLightInfluence = 0 ,TracerLifeTime = .2 ,TracerWidth = .1 ,RandomTracer = false ,TracerEveryXShots = 5 ,TracerChance = 100 ,BulletLight = false ,BulletLightBrightness = 1 ,BulletLightColor = Color3.fromRGB(255,255,255) ,BulletLightRange = 10 ,ExplosiveHit = false ,ExPressure = 500 ,ExpRadius = 25 ,DestroyJointRadiusPercent = 0 --- Between 0 & 1 ,ExplosionDamage = 100 ,LauncherDamage = 100 ,LauncherRadius = 25 ,LauncherPressure = 500 ,LauncherDestroyJointRadiusPercent = 0
--[[ END OF SERVICES ]]
local LocalPlayer = PlayersService.LocalPlayer while LocalPlayer == nil do PlayersService.ChildAdded:wait() LocalPlayer = PlayersService.LocalPlayer end local PlayerGui = LocalPlayer:WaitForChild("PlayerGui") local success, UserShouldLocalizeGameChatBubble = pcall(function() return UserSettings():IsUserFeatureEnabled("UserShouldLocalizeGameChatBubble") end) local UserShouldLocalizeGameChatBubble = success and UserShouldLocalizeGameChatBubble local function getMessageLength(message) return utf8.len(utf8.nfcnormalize(message)) end
-- Decompiled with the Synapse X Luau decompiler.
return { ["Halloween Quests 2022"] = { { title = "Scary Hours", desc = "Complete all 2 Halloween Event 2022 Quests!", amount = 1, difficulty = 5, secret = true, rewardType = "Halloween Candy", reward = 10000000 } } };
--function
function whitelisted(player) for _, p in pairs(whitelist) do if player==p then return true end end return false end
--Input attachments and effects
for i,v in pairs(Wheels) do local att = Instance.new("Attachment") att.Name = "EffectsCenter" att.Parent = AttachmentPart v.AttCenter = att script.Smoke:Clone().Parent = att v.Smoke = att.Smoke attR = Instance.new("Attachment") attR.Name = "EffectsR" attR.Parent = AttachmentPart v.AttR = attR attL = Instance.new("Attachment") attL.Name = "EffectsL" attL.Parent = AttachmentPart v.AttL = attL local Beam = script.TireTrail:Clone() Beam.Parent = AttachmentPart Beam.Attachment0 = attL Beam.Attachment1 = attR v.Beam = Beam local Sound = script.Drift:Clone() Sound.Parent = v.Wheel v.DriftSound = Sound end
--[=[ @function sort @within Array @param array {T} -- The array to sort. @param comparator? (a: T, b: T) -> boolean -- The comparator function. @return {T} -- The sorted array. Sorts an array. ```lua local array = { "a", "b", "c", "d", "e" } local new = Sort(array, function(a, b) return a > b end) -- { "e", "d", "c", "b", "a" } ``` ]=]
local function sort<T>(array: { T }, comparator: ((firstValue: T, secondValue: T) -> boolean)?): { T } local result = Copy(array) table.sort(result, comparator) return result end return sort
--// Servc
local UIS = game:GetService('UserInputService') local SSS = game:GetService('ServerScriptService') local Players = game:GetService('Players') local rp = game:GetService("ReplicatedStorage")
--[=[ Utility functions that are related to the Spring object @class SpringUtils ]=]
local EPSILON = 1e-6 local require = require(script.Parent.loader).load(script) local LinearValue = require("LinearValue") local SpringUtils = {}
-- Idle:Play()
end) tool.Activated:Connect(function() if Debounce == true then Debounce = true tool.Handle.sound_open:Play()
------------------------------------------------------------------------ -- * reader() should return a string, or nil if nothing else to parse. -- Additional data can be set only during stream initialization -- * Readers are handled in lauxlib.c, see luaL_load(file|buffer|string) -- * LUAL_BUFFERSIZE=BUFSIZ=512 in make_getF() (located in luaconf.h) -- * Original Reader typedef: -- const char * (*lua_Reader) (lua_State *L, void *ud, size_t *sz); -- * This Lua chunk reader implementation: -- returns string or nil, no arguments to function ------------------------------------------------------------------------
-- If you want to know how to retexture a hat, read this: http://www.roblox.com/Forum/ShowPost.aspx?PostID=10502388
debounce = true function onTouched(hit) if (hit.Parent:findFirstChild("Humanoid") ~= nil and debounce == true) then debounce = false h = Instance.new("Hat") p = Instance.new("Part") h.Name = "Hat" -- It doesn't make a difference, but if you want to make your place in Explorer neater, change this to the name of your hat. p.Parent = h p.Position = hit.Parent:findFirstChild("Head").Position p.Name = "Handle" p.formFactor = 0 p.Size = Vector3.new(-0,-0,-1) p.BottomSurface = 0 p.TopSurface = 0 p.Locked = true script.Parent.Mesh:clone().Parent = p h.Parent = hit.Parent h.AttachmentPos = Vector3.new(0,0.075,0.05) -- Change these to change the positiones of your hat, as I said earlier. wait(5) debounce = true end end script.Parent.Touched:connect(onTouched)
--[[Susupension]]
Tune.SusEnabled = true -- works only in with PGSPhysicsSolverEnabled, defaults to false when PGS is disabled --Front Suspension Tune.FSusDamping = 500 -- Spring Dampening Tune.FSusStiffness = 9000 -- Spring Force Tune.FAntiRoll = 50 -- Anti-Roll (Gyro Dampening) Tune.FSusLength = 2 -- Suspension length (in studs) Tune.FPreCompress = .3 -- Pre-compression adds resting length force Tune.FExtensionLim = .0 -- Max Extension Travel (in studs) Tune.FCompressLim = .1 -- Max Compression Travel (in studs) Tune.FSusAngle = 80 -- Suspension Angle (degrees from horizontal) Tune.FWsBoneLen = 5 -- Wishbone Length Tune.FWsBoneAngle = 0 -- Wishbone angle (degrees from horizontal) Tune.FAnchorOffset = { -- Suspension anchor point offset (relative to center of wheel) --[[Lateral]] -.4 , -- positive = outward --[[Vertical]] -.5 , -- positive = upward --[[Forward]] 0 } -- positive = forward --Rear Suspension Tune.RSusDamping = 500 -- Spring Dampening Tune.RSusStiffness = 9000 -- Spring Force Tune.FAntiRoll = 50 -- Anti-Roll (Gyro Dampening) Tune.RSusLength = 2 -- Suspension length (in studs) Tune.RPreCompress = .3 -- Pre-compression adds resting length force Tune.RExtensionLim = .0 -- Max Extension Travel (in studs) Tune.RCompressLim = .1 -- Max Compression Travel (in studs) Tune.RSusAngle = 80 -- Suspension Angle (degrees from horizontal) Tune.RWsBoneLen = 5 -- Wishbone Length Tune.RWsBoneAngle = 0 -- Wishbone angle (degrees from horizontal) Tune.RAnchorOffset = { -- Suspension anchor point offset (relative to center of wheel) --[[Lateral]] -.4 , -- positive = outward --[[Vertical]] -.5 , -- positive = upward --[[Forward]] 0 } -- positive = forward --Aesthetics Tune.SusVisible = true -- Spring Visible Tune.WsBVisible = false -- Wishbone Visible Tune.SusRadius = .2 -- Suspension Coil Radius Tune.SusThickness = .1 -- Suspension Coil Thickness Tune.SusColor = "Bright red" -- Suspension Color [BrickColor] Tune.SusCoilCount = 6 -- Suspension Coil Count Tune.WsColor = "Black" -- Wishbone Color [BrickColor] Tune.WsThickness = .1 -- Wishbone Rod Thickness