prompt
stringlengths
2
14.7k
completion
stringlengths
1
99.7k
--[=[ Switch map but for brios. The resulting observable will be disconnected on the end of the brio's life. @deprecated 3.6.0 -- This method does not wrap the resulting value in a Brio, which can sometimes lead to leaks. @param project (value: TBrio) -> TProject @return (source: Observable<Brio<TBrio>>) -> Observable<TResult> ]=]
function RxBrioUtils.switchMap(project) assert(type(project) == "function", "Bad project") warn("[RxBrioUtils.switchMap] - Deprecated since 3.6.0. Use RxBrioUtils.switchMapBrio") return Rx.switchMap(RxBrioUtils.mapBrio(project)) end
--thank to Sinahi for making the beautiful flag! --https://www.roblox.com/Wavin-Flag-item?id=440874100
local rbx='rbxassetid://' local flagids={ 440821546,440821646,440821766,440822311, 440823132,440823493,440823602,440823734, 440823940,440824067,440824314,440824941, 440825077,440825340,440825848,440826132} --this is all the mesh ids in one table, in order local texture=227819766 --asset id here local flagmesh=script.Parent.Mesh flagmesh.TextureId=rbx..texture local n=1 repeat for i,v in next,flagids do wait() flagmesh.MeshId=rbx..v end n=n+1 if n>=#flagids then n=1 else end until nil
-- === STORED DATA FORMAT === -- The format of the per-player data saved to Data Stores is as follows: -- { -- status = "banned" OR "not-banned", -- expires = timestamp (int) OR nil, -- reason = string OR nil, -- kicks = int, -- lastKick = timestamp (int) -- }
-- -- -- -- -- -- -- --DIRECTION SCROLL-- -- -- -- -- -- -- --
This.Parent.Parent.Parent:WaitForChild("Velocity").Changed:connect(function(val) if This.Parent.Parent.Parent:WaitForChild("Direction").Value == 1 and val > 0 then This.SurfaceGui.Direction.Text = "▲" elseif This.Parent.Parent.Parent:WaitForChild("Direction").Value == -1 and val < 0 then This.SurfaceGui.Direction.Text = "▼" elseif This.Parent.Parent.Parent:WaitForChild("Direction").Value == 1 and val == 0 then This.SurfaceGui.Direction.Text = "" elseif This.Parent.Parent.Parent:WaitForChild("Direction").Value == -1 and val == 0 then This.SurfaceGui.Direction.Text = "" else This.SurfaceGui.Direction.Text = "" end end)
----------------- --| Variables |-- -----------------
local DebrisService = Game:GetService('Debris') local Rocket = script.Parent local CreatorTag = WaitForChild(Rocket, 'creator') local SwooshSound = WaitForChild(Rocket, 'Swoosh')
--[[ LOWGames Studios Date: 27 October 2022 by Elder ]]
-- while not require(game.ReplicatedStorage:WaitForChild("Framework"):WaitForChild("Library")).Loaded do game:GetService("RunService").Heartbeat:Wait(); end; return function(p1, p2, ...) local v1 = ...; for v2 = 1, 3 do p1.Flames:FindFirstChild(v2).Visible = v2 <= v1; end; end;
--[[ wait(3); M:Test1(script.Parent); wait(3); M:Test2(script.Parent); wait(3); M:Test3(script.Parent); --]]
M:SetCPEmpire(Sp); wait(3); M:SetCPRepublic(Sp); wait(3); M:SetCPCartel(Sp); wait(3); end
--Edit if you want to have a server check if collisions are enabled or disabled----------
local function GetCollisions(Name) return true end
-- RightShoulder.MaxVelocity = 0.05 -- LeftShoulder.MaxVelocity = 0.05
LimbAmplitude = 1 LimbFrequency = 12 NeckAmplitude = 0 NeckFrequency = 0 NeckDesiredAngle = 0 elseif (Pose == "Climbing") then
-- Note: The active transparency controller could be made to listen for this event itself.
function CameraModule:OnCameraSubjectChanged() local camera = workspace.CurrentCamera local cameraSubject = camera and camera.CameraSubject if self.activeTransparencyController then self.activeTransparencyController:SetSubject(cameraSubject) end if self.activeOcclusionModule then self.activeOcclusionModule:OnCameraSubjectChanged(cameraSubject) end self:ActivateCameraController(nil, camera.CameraType) end function CameraModule:OnCameraTypeChanged(newCameraType: Enum.CameraType) if newCameraType == Enum.CameraType.Scriptable then if UserInputService.MouseBehavior == Enum.MouseBehavior.LockCenter then UserInputService.MouseBehavior = Enum.MouseBehavior.Default end end -- Forward the change to ActivateCameraController to handle self:ActivateCameraController(nil, newCameraType) end
--[=[ Pseudo localizes text. Useful for verifying translation without having actual translations available @class PseudoLocalize ]=]
local PseudoLocalize = {}
--[=[ Returns whether the value is a basic pane @param value any @return boolean ]=]
function BasicPane.isBasicPane(value) return type(value) == "table" and Maid.isMaid(value._maid) and Signal.isSignal(value.VisibleChanged) and type(value.SetVisible) == "function" and type(value.IsVisible) == "function" and type(value.Show) == "function" and type(value.Hide) == "function" and type(value.Toggle) == "function" and type(value.Destroy) == "function" end
--/Recoil Modification
module.camRecoil = { RecoilUp = .9 ,RecoilTilt = 1 ,RecoilLeft = 1.05 ,RecoilRight = 1.05 } module.gunRecoil = { RecoilUp = .9 ,RecoilTilt = 1 ,RecoilLeft = 1.05 ,RecoilRight = 1.05 } module.AimRecoilReduction = 1 module.AimSpreadReduction = 1 module.MinRecoilPower = 1 module.MaxRecoilPower = 1 module.RecoilPowerStepAmount = 1 module.MinSpread = 1.5 module.MaxSpread = 1 module.AimInaccuracyStepAmount = 1 module.AimInaccuracyDecrease = 1 module.WalkMult = 1 module.MuzzleVelocityMod = .75 return module
--[[** Links several instances to a janitor, which is then returned. @param [t:...Instance] ... All the instances you want linked. @returns [t:Janitor] A new janitor that can be used to manually disconnect all LinkToInstances. **--]]
function Janitor.__index:LinkToInstances(...) local ManualCleanup = Janitor.new() for _, Object in ipairs({...}) do ManualCleanup:Add(self:LinkToInstance(Object, true), "Disconnect") end return ManualCleanup end return Janitor
--[[ A function to return a unique ID, used for search results ]]
local lastId = 0 return function() lastId = lastId + 1 return lastId end
--Simultaneous Turn 2--: Simultaneous left turn for "SignalTurn1" and "SignalTurn1a" during a red light for all. --Next cycle, Simultaneous left turn for "SignalTurn2" and "SignalTurn2a" during a red light for all. --USES: Signal1, Signal1a, Signal2, Signal2a, Turn1, Turn1a, Turn2, Turn2a
while true do PedValues = script.Parent.Parent.PedValues SignalValues = script.Parent.Parent.SignalValues TurnValues = script.Parent.Parent.TurnValues
--[[ Constants ]]
-- local DPAD_SHEET = "rbxasset://textures/ui/DPadSheet.png" local COMPASS_DIR = { Vector3.new(1, 0, 0), -- E Vector3.new(1, 0, 1).unit, -- SE Vector3.new(0, 0, 1), -- S Vector3.new(-1, 0, 1).unit, -- SW Vector3.new(-1, 0, 0), -- W Vector3.new(-1, 0, -1).unit, -- NW Vector3.new(0, 0, -1), -- N Vector3.new(1, 0, -1).unit, -- NE }
--local HoldClose = Humanoid:LoadAnimation(AnimationsFolder.idleclosed) --local Hold = Humanoid:LoadAnimation(AnimationsFolder.idle) --local Open = Humanoid:LoadAnimation(AnimationsFolder.open) --local Close = Humanoid:LoadAnimation(AnimationsFolder.close) --local Relight = Humanoid:LoadAnimation(AnimationsFolder.relight)
script.Parent.Activated:Connect(function() if not DB and DB2 then DB = true DB2 = false
-- / Round Assets / --
local RoundAssets = game.ServerStorage.RoundAssets local Scripts = RoundAssets.Scripts
--[[ Roblox avatars are a nightmare to physically simulate, either because of innate clipping or because package hitboxes are insane. Don't believe me? - https://i.imgur.com/471ffsb.png (bundle id=475) - https://i.imgur.com/fRpkSdS.png (bundle id=429) - https://i.imgur.com/k07QVWR.png (bundle id=162) - https://i.imgur.com/F2lo4Te.jpg (bundle id=168) - https://i.imgur.com/je4GEas.png (bundle id=475) - https://i.imgur.com/0oUu1ra.png (bundle id=192) So we have to disable collisions between a bunch of parts to get them to simulate without spazzing out due to overconstraints. We don't want to disable all collision, as that would result in ugly things like the legs phasing through each other, or a hand phasing through a leg. Specifically looking at Roblox bundles, the torso clipping is by far the worst (e.g. Deathspeaker UpperTorso clips with EVERY OTHER BODY PART), with next up being nearby ballsocketish joints (e.g. a shoulder and the head, or the two upper legs). We can't just hardcode limb names and get it over with though (Humanoids are already bad enough at this...) if we want ragdolls to work with arbitrary characters, so my solution was: "Parent" limbs (e.g. torso is a parent to the head, arms, and legs) should not collide with their children. This solves the torso problem in a generic way that should work with most characters. Limb "roots" (e.g. shoulder, head, hips) can't collide with each other. Again, this solves the problems we had with Roblox bundles while still working with arbitrary characters Maybe this approach won't work for 100% of characters, but hopefully it should work in most cases. --]]
local getLastWordFromPascaleCase = require(script.Parent:WaitForChild("getLastWordFromPascalCase"))
--------------------------------------
local _roleStages = { Lobby = {"Lobby"}, Queue = {"Queue"}, Gameplay = {"Waiting", "Gameplay", "EndGame"}, } local conf = { debug_mode = false, stages = _roleStages.Queue, modes = { DEFAULT = { title = "Last One Standing!", temp_queue_place = _places.queue_default, gameplay_place = _places.gameplay_development, }, DEATHMATCH = { title = "Solo Deathmatch!", temp_queue_place = _places.queue_deathmatch, gameplay_place = _places.gameplay_development, }, TEAM_DEATHMATCH = { title = "Team Deathmatch!", temp_queue_place = _places.queue_teamDeathmatch, gameplay_place = _places.gameplay_development, }, FREE_PLAY = { title = "Free Play!", temp_queue_place = _places.queue_freePlay, gameplay_place = nil, }, }, ui_mode_list = { "DEFAULT", "DEATHMATCH", "TEAM_DEATHMATCH", "FREE_PLAY", }, lobby_use_boring_flow = true, lobby_place = _places.lobby, lobby_teleportation_retries = 2, default_game_mode = "DEATHMATCH", override = false, disable_queue = false, queue_time_limit = 60 * 3, gameplay_wait_for_join_timeout = 40, min_queue_players = 2, max_queue_players = 115, queue_reservation_timeout = 5, queue_server_response_timeout = 30, queue_server_creation_timeout = 120, spectate_camera_zoom_distance = 12, camera_wait_time_after_death = 3, map_size = 2450 * 4, map_offset = Vector3.new(4900, 0, 4900), delivery_vehicle_spawn_radius = 2500, delivery_vehicle_spawn_height = 2000, minimap_width = 0.3, minimap_height = 0.3, minimap_zoom = 3, worldmap_width = 0.9, worldmap_height = 0.9, worldmap_zoom = 1, player_health = 100, force_rthro = false, -- Respawn/Deathmatch config values (must override all these if you make respawn true) respawn = false, respawnTime = nil, respawn_radius_lowest_fraction = nil, -- players will respawn between lowest_fraction and highest_fraction of target storm radius respawn_radius_highest_fraction = nil, respawn_height_fraction = nil, -- fraction of delivery_vehicle_spawn_height killsNeededToWin = nil, -- Team modes config values (must override if using teams) num_teams = 0, team_names = nil, team_colors = nil, num_respawn_tickets = nil, delivery_vehicle_offset_from_center = nil, -- delivery vehicle paths will be set this distance from center dividing line all_players_can_chat = true, admin_group_ids = { 3958078, -- Reference Team 4448406, -- Trapped in amber I 1200769, -- Roblox Admins }, external_qa_group_ids = { 4448406, }, reference_games_user_ids = { 377987375, 7210880, 782148096, 628764692, 613016484, 671465276, 169775909, 402758067, 366370235, 688488720, 550574694, 315259569, 1114780684, 1144106728, 1043064299, 462128752, 606075979, 101107579, 101134337, 439546926, 1298953044, 959520514, }, community_qa_group_id = 3055661, intern_group_id = 2868472, intern_group_rank_id = 100, test_bot_group_ids = { 5084675, }, storm = { radius = 6000, time_before_start = 120, debug_time_scale = 1, number_of_stages = 10, -- stage 0 (show starting circle with no transition) { transition_length = 0, wait_length = 150, damage = 1, move_scale = 0, shrinkage_factor = 0 }, -- stage 1 { transition_length = 120, wait_length = 120, damage = 1, shrinkage_factor = 0.5 }, -- stage 2 { transition_length = 90, wait_length = 90, damage = 2, shrinkage_factor = 0.5 }, -- stage 3 { transition_length = 75, wait_length = 75, damage = 3, shrinkage_factor = 0.5 }, -- stage 4 { transition_length = 60, wait_length = 60, damage = 5, shrinkage_factor = 0.5 }, -- stage 5 (start moving) { transition_length = 60, wait_length = 30, damage = 7, move_scale = 1, shrinkage_factor = 0 }, -- stage 6 { transition_length = 50, wait_length = 20, damage = 10, move_scale = 1, shrinkage_factor = 0 }, -- stage 7 { transition_length = 45, wait_length = 15, damage = 10, move_scale = 1, shrinkage_factor = 0 }, -- stage 8 { transition_length = 45, wait_length = 5, damage = 10, move_scale = 1, shrinkage_factor = 0 }, -- stage 9 (shrink to nothing) { transition_length = 45, wait_length = 0, damage = 10, move_scale = 0, shrinkage_factor = 1 }, }, --The amount of time to wait for new players to join before kicking off gameplay mode, so we can collect more data on what players are expected gameplay_start_delay = 5, -- Flags player_nil_parent_enabled = false, ---- Game stage specific settings ---- gameplay = { gameplay_chat_enabled = true, }, avatarOutfits = { 680889488, 441740226, 723925014, 810215407, 864499159, 862260912, 895148395, 943972626, 965363933, 1426384108, 1026787390, 1425874416, 1061810393, 1153193232, 1295571555, 1405375928, 1405384123, 525534957, 525543725, 661078277, 680269921, 320929398, 597550835, 597519851, 597493475, 597497519, 342230531, 342203958, 373238586, 404256664, 426842155, 441742685, 441744096, 441745631, 441746285, 615934704, 489946079, 489635259, 703808863, 742161851, 765909730, 786514132, 786498560, 786430795, 895140665, 919939396, 919943562, 965242919, }, avatarAnimations = { }, }
--[[ Recalculates this Computed's cached value and dependencies. Returns true if it changed, or false if it's identical. ]]
function class:update(): boolean -- remove this object from its dependencies' dependent sets for dependency in pairs(self.dependencySet) do dependency.dependentSet[self] = nil end -- we need to create a new, empty dependency set to capture dependencies -- into, but in case there's an error, we want to restore our old set of -- dependencies. by using this table-swapping solution, we can avoid the -- overhead of allocating new tables each update. self._oldDependencySet, self.dependencySet = self.dependencySet, self._oldDependencySet table.clear(self.dependencySet) local ok, newValue = captureDependencies(self.dependencySet, self._callback) if ok then local oldValue = self._value self._value = newValue -- add this object to the dependencies' dependent sets for dependency in pairs(self.dependencySet) do dependency.dependentSet[self] = true end return oldValue ~= newValue else -- this needs to be non-fatal, because otherwise it'd disrupt the -- update process logErrorNonFatal("computedCallbackError", newValue) -- restore old dependencies, because the new dependencies may be corrupt self._oldDependencySet, self.dependencySet = self.dependencySet, self._oldDependencySet -- restore this object in the dependencies' dependent sets for dependency in pairs(self.dependencySet) do dependency.dependentSet[self] = true end return false end end local function Computed<T>(callback: () -> T): Types.Computed<T> local self = setmetatable({ type = "State", kind = "Computed", dependencySet = {}, -- if we held strong references to the dependents, then they wouldn't be -- able to get garbage collected when they fall out of scope dependentSet = setmetatable({}, WEAK_KEYS_METATABLE), _oldDependencySet = {}, _callback = callback, _value = nil, }, CLASS_METATABLE) initDependency(self) self:update() return self end return Computed
--Glenn's Anti-Exploit System (GAE for short). This code is very ugly, but does job done
local function SecureSettings(Player, Gun, Module) if Player then local PreNewModule = Gun:FindFirstChild("Setting") if Gun and PreNewModule then local NewModule = require(PreNewModule) if (CompareTables(Module, NewModule) == false) then if KickPlayer then Player:Kick("You have been kicked and blocked from rejoining this specific server for exploiting gun stats.") warn(Player.Name.." has been kicked for exploiting gun stats.") table.insert(_G.TempBannedPlayers, Player) else warn(Player.Name.." - Potential Exploiter Bypass! Case 2: Changed Gun Stats From Client") end return end else --[[if KickPlayer then Player:Kick("Gun and Module are not found. Kicked!") warn("Gun and Module are missing from "..Player.Name.."'s inventory.") else warn(Player.Name.." - Potential Exploiter Bypass! Case 1: Missing Gun And Module") end]] warn(Player.Name.." - Potential Exploiter Bypass! Case 1: Missing Gun And Module") return end else warn("Player does not exist.") return end end function _G.SecureSettings(Player, Gun, Module) SecureSettings(Player, Gun, Module) end VisualizeHitEffect.OnServerEvent:Connect(function(Player, Type, Replicate, Hit, Position, Normal, Material, ...) local Table = {...} if Type == "Normal" then for _, plr in next, Players:GetPlayers() do if plr ~= Player then VisualizeHitEffect:FireClient(plr, Type, Replicate, Hit, Position, Normal, Material, Table[1], Table[2], Table[3], nil) end end elseif Type == "Blood" then for _, plr in next, Players:GetPlayers() do if plr ~= Player then VisualizeHitEffect:FireClient(plr, Type, Replicate, Hit, Position, Normal, Material, Table[1], Table[2], nil) end end end end) VisualizeBullet.OnServerEvent:Connect(function(Player, Module, Tool, Handle, VMHandle, CLDirections, SVDirections, FirePointObject, HitEffectData, BloodEffectData, BulletHoleData, ExplosiveData, BulletData, WhizData, ClientData) SecureSettings(Player, Tool, Module) for _, plr in next, Players:GetPlayers() do if plr ~= Player then VisualizeBullet:FireClient(plr, Module, Tool, Handle, VMHandle, CLDirections, SVDirections, FirePointObject, HitEffectData, BloodEffectData, BulletHoleData, ExplosiveData, BulletData, WhizData, ClientData) end end end) VisualizeMuzzle.OnServerEvent:Connect(function(Player, Handle, VMHandle, MuzzleFlashEnabled, MuzzleLightData, MuzzleEffect, Replicate) for _, plr in next, Players:GetPlayers() do if plr ~= Player then VisualizeMuzzle:FireClient(plr, Handle, VMHandle, MuzzleFlashEnabled, MuzzleLightData, MuzzleEffect, Replicate) end end end) PlayAudio.OnServerEvent:Connect(function(Player, Audio, LowAmmoAudio, Replicate) for _, plr in next, Players:GetPlayers() do if plr ~= Player then PlayAudio:FireClient(plr, Audio, LowAmmoAudio, Replicate) end end end) ShatterGlass.OnServerEvent:Connect(function(Player, Hit, Pos, Dir) if Hit then if Hit.Name == "_glass" then if Hit.Transparency ~= 1 then if PhysicEffect then local Sound = Instance.new("Sound") Sound.SoundId = "http://roblox.com/asset/?id=2978605361" Sound.TimePosition = .1 Sound.Volume = 1 Sound.Parent = Hit Sound:Play() Sound.Ended:Connect(function() Sound:Destroy() end) GlassShattering:Shatter(Hit, Pos, Dir + Vector3.new(math.random(-25, 25), math.random(-25, 25), math.random(-25, 25))) --[[local LifeTime = 5 local FadeTime = 1 local SX, SY, SZ = Hit.Size.X, Hit.Size.Y, Hit.Size.Z for X = 1, 4 do for Y = 1, 4 do local Part = Hit:Clone() local position = Vector3.new(X - 2.1, Y - 2.1, 0) * Vector3.new(SX / 4, SY / 4, SZ) local currentTransparency = Part.Transparency Part.Name = "_shatter" Part.Size = Vector3.new(SX / 4, SY / 4, SZ) Part.CFrame = Hit.CFrame * (CFrame.new(Part.Size / 8) - Hit.Size / 8 + position) Part.Velocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)) Part.Parent = workspace --Debris:AddItem(Part, 10) task.delay(LifeTime, function() if Part.Parent ~= nil then if LifeTime > 0 then local t0 = os.clock() while true do local Alpha = math.min((os.clock() - t0) / FadeTime, 1) Part.Transparency = Math.Lerp(currentTransparency, 1, Alpha) if Alpha == 1 then break end task.wait() end Part:Destroy() else Part:Destroy() end end end) Part.Anchored = false end end]] else local Sound = Instance.new("Sound") Sound.SoundId = "http://roblox.com/asset/?id=2978605361" Sound.TimePosition = .1 Sound.Volume = 1 Sound.Parent = Hit Sound:Play() Sound.Ended:Connect(function() Sound:Destroy() end) local Particle = script.Shatter:Clone() Particle.Color = ColorSequence.new(Hit.Color) Particle.Transparency = NumberSequence.new{ NumberSequenceKeypoint.new(0, Hit.Transparency), --(time, value) NumberSequenceKeypoint.new(1, 1) } Particle.Parent = Hit task.delay(0.01, function() Particle:Emit(10 * math.abs(Hit.Size.magnitude)) Debris:AddItem(Particle, Particle.Lifetime.Max) end) Hit.CanCollide = false Hit.Transparency = 1 end end else error("Hit part's name must be '_glass'.") end else error("Hit part doesn't exist.") end end) local function CalculateDamage(Damage, TravelDistance, ZeroDamageDistance, FullDamageDistance) local ZeroDamageDistance = ZeroDamageDistance or 10000 local FullDamageDistance = FullDamageDistance or 1000 local DistRange = ZeroDamageDistance - FullDamageDistance local FallOff = math.clamp(1 - (math.max(0, TravelDistance - FullDamageDistance) / math.max(1, DistRange)), 0, 1) return math.max(Damage * FallOff, 0) end InflictTarget.OnServerInvoke = function(Player, Module, Tool, Tagger, TargetHumanoid, TargetTorso, Damage, Misc, Critical, Hit, GoreData, ExplosiveData) SecureSettings(Player, Tool, Module) --Second layer local TrueDamage if ExplosiveData and ExplosiveData[1] then local DamageMultiplier = (1 - math.clamp((ExplosiveData[3] / ExplosiveData[2]), 0, 1)) TrueDamage = ExplosiveData[4] and ((Hit and Hit.Name == "Head" and Damage[3]) and Damage[1] * Damage[2] or Damage[1]) * DamageMultiplier or (Hit and Hit.Name == "Head" and Damage[3]) and Damage[1] * Damage[2] or Damage[1] else TrueDamage = Damage[5] and CalculateDamage((Hit and Hit.Name == "Head" and Damage[3]) and Damage[1] * Damage[2] or Damage[1], Damage[4], Damage[6], Damage[7]) or (Hit and Hit.Name == "Head" and Damage[3]) and Damage[1] * Damage[2] or Damage[1] end --GORE if TargetHumanoid.Health - TrueDamage <= 0 and not TargetHumanoid.Parent:FindFirstChild("gibbed") then if Hit then if Hit.Name == "Head" or Hit.Name == "Torso" or Hit.Name == "Left Arm" or Hit.Name == "Right Arm" or Hit.Name == "Right Leg" or Hit.Name == "Left Leg" or Hit.Name == "UpperTorso" or Hit.Name == "LowerTorso" or Hit.Name == "LeftUpperArm" or Hit.Name == "LeftLowerArm" or Hit.Name == "LeftHand" or Hit.Name == "RightUpperArm" or Hit.Name == "RightLowerArm" or Hit.Name == "RightHand" or Hit.Name == "RightUpperLeg" or Hit.Name == "RightLowerLeg" or Hit.Name == "RightFoot" or Hit.Name == "LeftUpperLeg" or Hit.Name == "LeftLowerLeg" or Hit.Name == "LeftFoot" then VisualizeGore:FireAllClients(Hit, TargetHumanoid.Parent, GoreData) end end end if Tagger then local TargetTEAM = TargetHumanoid.Parent:FindFirstChild("TEAM") local TEAM = Tool.Parent:FindFirstChild("TEAM") local CanDamage = (TEAM and TargetTEAM) and (TargetTEAM.Value ~= TEAM.Value) or DamageModule.CanDamage(TargetHumanoid.Parent, Tagger) if ExplosiveData and ExplosiveData[1] and ExplosiveData[5] then if TargetHumanoid.Parent.Name == Tagger.Name then CanDamage = (TargetHumanoid.Parent.Name == Tagger.Name) if ExplosiveData[7] then TrueDamage = TargetHumanoid:GetState() ~= Enum.HumanoidStateType.Freefall and TrueDamage or (TrueDamage * (1 - ExplosiveData[6])) else TrueDamage = TrueDamage * (1 - ExplosiveData[6]) end end end if TargetHumanoid and TargetHumanoid.Health ~= 0 and TargetTorso and CanDamage then while TargetHumanoid:FindFirstChild("creator") do TargetHumanoid.creator:Destroy() end local creator = Instance.new("ObjectValue",TargetHumanoid) creator.Name = "creator" creator.Value = Tagger Debris:AddItem(creator, 5) if Critical[1] then local CriticalChanceRandom = Random.new():NextInteger(0, 100) if CriticalChanceRandom <= Critical[2] then TargetHumanoid:TakeDamage(math.abs(TrueDamage * Critical[3])) else TargetHumanoid:TakeDamage(math.abs(TrueDamage)) end else TargetHumanoid:TakeDamage(math.abs(TrueDamage)) end if Misc[1] > 0 then --knockback if not (ExplosiveData and ExplosiveData[1] and ExplosiveData[5]) then local Shover = Tagger.Character.HumanoidRootPart or Tagger.Character.Head local Duration = 0.1 local Speed = Misc[1] / Duration local Velocity = (TargetTorso.Position - Shover.Position).Unit * Speed local ShoveForce = Instance.new("BodyVelocity") ShoveForce.MaxForce = Vector3.new(1e9, 1e9, 1e9) ShoveForce.Velocity = Velocity ShoveForce.Parent = TargetTorso Debris:AddItem(ShoveForce, Duration) end end if Misc[2] > 0 and Tagger.Character.Humanoid and Tagger.Character.Humanoid.Health ~= 0 then --lifesteal if ExplosiveData and ExplosiveData[1] and ExplosiveData[5] then if not TargetHumanoid.Parent.Name == Tagger.Name then Tagger.Character.Humanoid.Health = Tagger.Character.Humanoid.Health + (TrueDamage * Misc[2]) end else Tagger.Character.Humanoid.Health = Tagger.Character.Humanoid.Health + (TrueDamage * Misc[2]) end end if Misc[3] then --affliction local roll = math.random(1, 100) if roll <= Misc[5] then if not TargetHumanoid.Parent:FindFirstChild(Misc[4]) then local Debuff = Tool:FindFirstChild("GunScript_Server"):FindFirstChild(Misc[4]):Clone() Debuff.creator.Value = creator.Value Debuff.Parent = TargetHumanoid.Parent Debuff.Disabled = false end end end end else warn("Unable to register damage because player is no longer existing here") end end Players.PlayerAdded:Connect(function(player) for i, v in pairs(_G.TempBannedPlayers) do if v == player.Name then player:Kick("You cannot rejoin a server where you were kicked from.") warn(player.Name.." tried to rejoin a server where he/she was kicked from.") break end end end)
--- VARIABLES/CONSTANTS ---
HitEntities = {} AnimationStep = 1
-- / Workspace Assets / --
local GameHolder = game.Workspace.GameHolder local GamemodesMapHolder = GameHolder.GamemodesMapHolder local GameAssetsHolder = GameHolder.GameAssetsHolder local Lobby = game.Workspace.Lobby -- / Game Assets / -- local GameAssets = game.ServerStorage.GameAssets
--[[ if your changing the DataStore name from LB to anything else you should change it inside the LeaderboardHandler too ]]
-- local leaderboardDS = ds:GetOrderedDataStore("LB") players.PlayerAdded:Connect(function(plr) local leaderstats = Instance.new("Folder") leaderstats.Name = "leaderstats" leaderstats.Parent = plr local Cash = Instance.new("NumberValue") Cash.Name = "Cash" Cash.Parent = leaderstats local Coins = Instance.new("NumberValue") Coins.Name = "C" Coins.Parent = leaderstats end) while true do for i , v in pairs(players:GetPlayers()) do local succ , errmsg = pcall(function() -- saving the Coins value with the player's userid as the key leaderboardDS:SetAsync(v.UserId , v.leaderstats.Coins.Value) end) end -- recommend waiting for a longer time task.wait(220) end
--[[Drivetrain]]
Tune.Config = "RWD" --"FWD" , "RWD" , "AWD" --Differential Settings Tune.FDiffSlipThres = 50 -- 1 - 100% (Max threshold of applying full lock determined by deviation from avg speed) Tune.FDiffLockThres = 50 -- 0 - 100% (0 - Bias toward slower wheel, 100 - Bias toward faster wheel) Tune.RDiffSlipThres = 15 -- 1 - 100% Tune.RDiffLockThres = 50 -- 0 - 100% Tune.CDiffSlipThres = 50 -- 1 - 100% [AWD Only] Tune.CDiffLockThres = 50 -- 0 - 100% [AWD Only] --Traction Control Settings Tune.TCSEnabled = false -- Implements TCS Tune.TCSThreshold = 20 -- Slip speed allowed before TCS starts working (in SPS) Tune.TCSGradient = 20 -- Slip speed gradient between 0 to max reduction (in SPS) Tune.TCSLimit = 10 -- Minimum amount of torque at max reduction (in percent)
-- << SETUP >> --Autosave
spawn(function() while wait(autosaveInterval) do for player, pdata in pairs(main.pd) do if main.players:FindFirstChild(player.Name) == nil then pdata = nil else savePlayerData(player) end end end end)
-- Function to periodically save player data
local function autoSave() while wait(AUTOSAVE_INTERVAL) do print("Saving") for playerUserId, data in pairs(sessionData) do savePlayerData(playerUserId) end end end
--------------------) Settings
Damage = 0 -- the ammout of health the player or mob will take Cooldown = 1 -- cooldown for use of the tool again BoneModelName = "Ray zone" -- name the zone model HumanoidName = "Humanoid"-- the name of player or mob u want to damage
--Made by Luckymaxer
Tool = script.Parent Main = Tool:WaitForChild("Main") FX = Main:WaitForChild("FX") Handle = Tool:WaitForChild("Handle") Light = Handle:WaitForChild("Light") Recoil = script:WaitForChild("Recoil") Players = game:GetService("Players") Debris = game:GetService("Debris") CastLaser = Tool:WaitForChild("CastLaser"):Clone() Modules = Tool:WaitForChild("Modules") Functions = require(Modules:WaitForChild("Functions")) BaseUrl = "http://www.roblox.com/asset/?id=" ConfigurationBin = Tool:WaitForChild("Configuration") Configuration = {} Configuration = Functions.CreateConfiguration(ConfigurationBin, Configuration) ToolEquipped = false Remotes = Tool:WaitForChild("Remotes") Sounds = { Fire = Handle:WaitForChild("Fire"), HeadShot = Handle:WaitForChild("HeadShot"), } BasePart = Instance.new("Part") BasePart.Shape = Enum.PartType.Block BasePart.Material = Enum.Material.Plastic BasePart.TopSurface = Enum.SurfaceType.Smooth BasePart.BottomSurface = Enum.SurfaceType.Smooth BasePart.FormFactor = Enum.FormFactor.Custom BasePart.Size = Vector3.new(0.2, 0.2, 0.2) BasePart.CanCollide = true BasePart.Locked = true BasePart.Anchored = false BaseRay = BasePart:Clone() BaseRay.Name = "Ray" BaseRay.BrickColor = BrickColor.new("Bright yellow") BaseRay.Material = Enum.Material.SmoothPlastic BaseRay.Size = Vector3.new(0.2, 0.2, 0.2) BaseRay.Anchored = true BaseRay.CanCollide = false
-- Was called OnMoveTouchEnded in previous version
function DynamicThumbstick:OnInputEnded() self.moveTouchObject = nil self.moveVector = ZERO_VECTOR3 self:FadeThumbstick(false) end function DynamicThumbstick:FadeThumbstick(visible) if not visible and self.moveTouchObject then return end if self.isFirstTouch then return end if self.startImageFadeTween then self.startImageFadeTween:Cancel() end if self.endImageFadeTween then self.endImageFadeTween:Cancel() end for i = 1, #self.middleImages do if self.middleImageFadeTweens[i] then self.middleImageFadeTweens[i]:Cancel() end end if visible then self.startImageFadeTween = TweenService:Create(self.startImage, ThumbstickFadeTweenInfo, { ImageTransparency = 0 }) self.startImageFadeTween:Play() self.endImageFadeTween = TweenService:Create(self.endImage, ThumbstickFadeTweenInfo, { ImageTransparency = 0.2 }) self.endImageFadeTween:Play() for i = 1, #self.middleImages do self.middleImageFadeTweens[i] = TweenService:Create(self.middleImages[i], ThumbstickFadeTweenInfo, { ImageTransparency = MIDDLE_TRANSPARENCIES[i] }) self.middleImageFadeTweens[i]:Play() end else self.startImageFadeTween = TweenService:Create(self.startImage, ThumbstickFadeTweenInfo, { ImageTransparency = 1 }) self.startImageFadeTween:Play() self.endImageFadeTween = TweenService:Create(self.endImage, ThumbstickFadeTweenInfo, { ImageTransparency = 1 }) self.endImageFadeTween:Play() for i = 1, #self.middleImages do self.middleImageFadeTweens[i] = TweenService:Create(self.middleImages[i], ThumbstickFadeTweenInfo, { ImageTransparency = 1 }) self.middleImageFadeTweens[i]:Play() end end end function DynamicThumbstick:FadeThumbstickFrame(fadeDuration, fadeRatio) self.fadeInAndOutHalfDuration = fadeDuration * 0.5 self.fadeInAndOutBalance = fadeRatio self.tweenInAlphaStart = tick() end function DynamicThumbstick:InputInFrame(inputObject) local frameCornerTopLeft = self.thumbstickFrame.AbsolutePosition local frameCornerBottomRight = frameCornerTopLeft + self.thumbstickFrame.AbsoluteSize local inputPosition = inputObject.Position if inputPosition.X >= frameCornerTopLeft.X and inputPosition.Y >= frameCornerTopLeft.Y then if inputPosition.X <= frameCornerBottomRight.X and inputPosition.Y <= frameCornerBottomRight.Y then return true end end return false end function DynamicThumbstick:DoFadeInBackground() local playerGui = LocalPlayer:FindFirstChildOfClass("PlayerGui") local hasFadedBackgroundInOrientation = false -- only fade in/out the background once per orientation if playerGui then if playerGui.CurrentScreenOrientation == Enum.ScreenOrientation.LandscapeLeft or playerGui.CurrentScreenOrientation == Enum.ScreenOrientation.LandscapeRight then hasFadedBackgroundInOrientation = self.hasFadedBackgroundInLandscape self.hasFadedBackgroundInLandscape = true elseif playerGui.CurrentScreenOrientation == Enum.ScreenOrientation.Portrait then hasFadedBackgroundInOrientation = self.hasFadedBackgroundInPortrait self.hasFadedBackgroundInPortrait = true end end if not hasFadedBackgroundInOrientation then self.fadeInAndOutHalfDuration = FADE_IN_OUT_HALF_DURATION_DEFAULT self.fadeInAndOutBalance = FADE_IN_OUT_BALANCE_DEFAULT self.tweenInAlphaStart = tick() end end function DynamicThumbstick:DoMove(direction) local currentMoveVector = direction -- Scaled Radial Dead Zone local inputAxisMagnitude = currentMoveVector.magnitude if inputAxisMagnitude < self.radiusOfDeadZone then currentMoveVector = ZERO_VECTOR3 else currentMoveVector = currentMoveVector.unit*( 1 - math.max(0, (self.radiusOfMaxSpeed - currentMoveVector.magnitude)/self.radiusOfMaxSpeed) ) currentMoveVector = Vector3.new(currentMoveVector.x, 0, currentMoveVector.y) end self.moveVector = currentMoveVector end function DynamicThumbstick:LayoutMiddleImages(startPos, endPos) local startDist = (self.thumbstickSize / 2) + self.middleSize local vector = endPos - startPos local distAvailable = vector.magnitude - (self.thumbstickRingSize / 2) - self.middleSize local direction = vector.unit local distNeeded = self.middleSpacing * NUM_MIDDLE_IMAGES local spacing = self.middleSpacing if distNeeded < distAvailable then spacing = distAvailable / NUM_MIDDLE_IMAGES end for i = 1, NUM_MIDDLE_IMAGES do local image = self.middleImages[i] local distWithout = startDist + (spacing * (i - 2)) local currentDist = startDist + (spacing * (i - 1)) if distWithout < distAvailable then local pos = endPos - direction * currentDist local exposedFraction = math.clamp(1 - ((currentDist - distAvailable) / spacing), 0, 1) image.Visible = true image.Position = UDim2.new(0, pos.X, 0, pos.Y) image.Size = UDim2.new(0, self.middleSize * exposedFraction, 0, self.middleSize * exposedFraction) else image.Visible = false end end end function DynamicThumbstick:MoveStick(pos) local vector2StartPosition = Vector2.new(self.moveTouchStartPosition.X, self.moveTouchStartPosition.Y) local startPos = vector2StartPosition - self.thumbstickFrame.AbsolutePosition local endPos = Vector2.new(pos.X, pos.Y) - self.thumbstickFrame.AbsolutePosition self.endImage.Position = UDim2.new(0, endPos.X, 0, endPos.Y) self:LayoutMiddleImages(startPos, endPos) end function DynamicThumbstick:BindContextActions() local function inputBegan(inputObject) if self.moveTouchObject then return Enum.ContextActionResult.Pass end if not self:InputInFrame(inputObject) then return Enum.ContextActionResult.Pass end if self.isFirstTouch then self.isFirstTouch = false local tweenInfo = TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.Out,0,false,0) TweenService:Create(self.startImage, tweenInfo, {Size = UDim2.new(0, 0, 0, 0)}):Play() TweenService:Create( self.endImage, tweenInfo, {Size = UDim2.new(0, self.thumbstickSize, 0, self.thumbstickSize), ImageColor3 = Color3.new(0,0,0)} ):Play() end self.moveTouchLockedIn = false self.moveTouchObject = inputObject self.moveTouchStartPosition = inputObject.Position self.moveTouchFirstChanged = true if FADE_IN_OUT_BACKGROUND then self:DoFadeInBackground() end return Enum.ContextActionResult.Pass end local function inputChanged(inputObject) if inputObject == self.moveTouchObject then if self.moveTouchFirstChanged then self.moveTouchFirstChanged = false local startPosVec2 = Vector2.new( inputObject.Position.X - self.thumbstickFrame.AbsolutePosition.X, inputObject.Position.Y - self.thumbstickFrame.AbsolutePosition.Y ) self.startImage.Visible = true self.startImage.Position = UDim2.new(0, startPosVec2.X, 0, startPosVec2.Y) self.endImage.Visible = true self.endImage.Position = self.startImage.Position self:FadeThumbstick(true) self:MoveStick(inputObject.Position) end self.moveTouchLockedIn = true local direction = Vector2.new( inputObject.Position.x - self.moveTouchStartPosition.x, inputObject.Position.y - self.moveTouchStartPosition.y ) if math.abs(direction.x) > 0 or math.abs(direction.y) > 0 then self:DoMove(direction) self:MoveStick(inputObject.Position) end return Enum.ContextActionResult.Sink end return Enum.ContextActionResult.Pass end local function inputEnded(inputObject) if inputObject == self.moveTouchObject then self:OnInputEnded() if self.moveTouchLockedIn then return Enum.ContextActionResult.Sink end end return Enum.ContextActionResult.Pass end local function handleInput(actionName, inputState, inputObject) if inputState == Enum.UserInputState.Begin then return inputBegan(inputObject) elseif inputState == Enum.UserInputState.Change then return inputChanged(inputObject) elseif inputState == Enum.UserInputState.End then return inputEnded(inputObject) elseif inputState == Enum.UserInputState.Cancel then self:OnInputEnded() end end ContextActionService:BindActionAtPriority( DYNAMIC_THUMBSTICK_ACTION_NAME, handleInput, false, DYNAMIC_THUMBSTICK_ACTION_PRIORITY, Enum.UserInputType.Touch) end function DynamicThumbstick:Create(parentFrame) if self.thumbstickFrame then self.thumbstickFrame:Destroy() self.thumbstickFrame = nil if self.onRenderSteppedConn then self.onRenderSteppedConn:Disconnect() self.onRenderSteppedConn = nil end end self.thumbstickSize = 45 self.thumbstickRingSize = 20 self.middleSize = 10 self.middleSpacing = self.middleSize + 4 self.radiusOfDeadZone = 2 self.radiusOfMaxSpeed = 20 local screenSize = parentFrame.AbsoluteSize local isBigScreen = math.min(screenSize.x, screenSize.y) > 500 if isBigScreen then self.thumbstickSize = self.thumbstickSize * 2 self.thumbstickRingSize = self.thumbstickRingSize * 2 self.middleSize = self.middleSize * 2 self.middleSpacing = self.middleSpacing * 2 self.radiusOfDeadZone = self.radiusOfDeadZone * 2 self.radiusOfMaxSpeed = self.radiusOfMaxSpeed * 2 end local function layoutThumbstickFrame(portraitMode) if portraitMode then self.thumbstickFrame.Size = UDim2.new(1, 0, 0.4, 0) self.thumbstickFrame.Position = UDim2.new(0, 0, 0.6, 0) else self.thumbstickFrame.Size = UDim2.new(0.4, 0, 2/3, 0) self.thumbstickFrame.Position = UDim2.new(0, 0, 1/3, 0) end end self.thumbstickFrame = Instance.new("Frame") self.thumbstickFrame.BorderSizePixel = 0 self.thumbstickFrame.Name = "DynamicThumbstickFrame" self.thumbstickFrame.Visible = false self.thumbstickFrame.BackgroundTransparency = 1.0 self.thumbstickFrame.BackgroundColor3 = Color3.fromRGB(0, 0, 0) self.thumbstickFrame.Active = false layoutThumbstickFrame(false) self.startImage = Instance.new("ImageLabel") self.startImage.Name = "ThumbstickStart" self.startImage.Visible = true self.startImage.BackgroundTransparency = 1 self.startImage.Image = TOUCH_CONTROLS_SHEET self.startImage.ImageRectOffset = Vector2.new(1,1) self.startImage.ImageRectSize = Vector2.new(144, 144) self.startImage.ImageColor3 = Color3.new(0, 0, 0) self.startImage.AnchorPoint = Vector2.new(0.5, 0.5) self.startImage.Position = UDim2.new(0, self.thumbstickRingSize * 3.3, 1, -self.thumbstickRingSize * 2.8) self.startImage.Size = UDim2.new(0, self.thumbstickRingSize * 3.7, 0, self.thumbstickRingSize * 3.7) self.startImage.ZIndex = 10 self.startImage.Parent = self.thumbstickFrame self.endImage = Instance.new("ImageLabel") self.endImage.Name = "ThumbstickEnd" self.endImage.Visible = true self.endImage.BackgroundTransparency = 1 self.endImage.Image = TOUCH_CONTROLS_SHEET self.endImage.ImageRectOffset = Vector2.new(1,1) self.endImage.ImageRectSize = Vector2.new(144, 144) self.endImage.AnchorPoint = Vector2.new(0.5, 0.5) self.endImage.Position = self.startImage.Position self.endImage.Size = UDim2.new(0, self.thumbstickSize * 0.8, 0, self.thumbstickSize * 0.8) self.endImage.ZIndex = 10 self.endImage.Parent = self.thumbstickFrame for i = 1, NUM_MIDDLE_IMAGES do self.middleImages[i] = Instance.new("ImageLabel") self.middleImages[i].Name = "ThumbstickMiddle" self.middleImages[i].Visible = false self.middleImages[i].BackgroundTransparency = 1 self.middleImages[i].Image = TOUCH_CONTROLS_SHEET self.middleImages[i].ImageRectOffset = Vector2.new(1,1) self.middleImages[i].ImageRectSize = Vector2.new(144, 144) self.middleImages[i].ImageTransparency = MIDDLE_TRANSPARENCIES[i] self.middleImages[i].AnchorPoint = Vector2.new(0.5, 0.5) self.middleImages[i].ZIndex = 9 self.middleImages[i].Parent = self.thumbstickFrame end local CameraChangedConn = nil local function onCurrentCameraChanged() if CameraChangedConn then CameraChangedConn:Disconnect() CameraChangedConn = nil end local newCamera = workspace.CurrentCamera if newCamera then local function onViewportSizeChanged() local size = newCamera.ViewportSize local portraitMode = size.X < size.Y layoutThumbstickFrame(portraitMode) end CameraChangedConn = newCamera:GetPropertyChangedSignal("ViewportSize"):Connect(onViewportSizeChanged) onViewportSizeChanged() end end workspace:GetPropertyChangedSignal("CurrentCamera"):Connect(onCurrentCameraChanged) if workspace.CurrentCamera then onCurrentCameraChanged() end self.moveTouchStartPosition = nil self.startImageFadeTween = nil self.endImageFadeTween = nil self.middleImageFadeTweens = {} self.onRenderSteppedConn = RunService.RenderStepped:Connect(function() if self.tweenInAlphaStart ~= nil then local delta = tick() - self.tweenInAlphaStart local fadeInTime = (self.fadeInAndOutHalfDuration * 2 * self.fadeInAndOutBalance) self.thumbstickFrame.BackgroundTransparency = 1 - FADE_IN_OUT_MAX_ALPHA*math.min(delta/fadeInTime, 1) if delta > fadeInTime then self.tweenOutAlphaStart = tick() self.tweenInAlphaStart = nil end elseif self.tweenOutAlphaStart ~= nil then local delta = tick() - self.tweenOutAlphaStart local fadeOutTime = (self.fadeInAndOutHalfDuration * 2) - (self.fadeInAndOutHalfDuration * 2 * self.fadeInAndOutBalance) self.thumbstickFrame.BackgroundTransparency = 1 - FADE_IN_OUT_MAX_ALPHA + FADE_IN_OUT_MAX_ALPHA*math.min(delta/fadeOutTime, 1) if delta > fadeOutTime then self.tweenOutAlphaStart = nil end end end) self.onTouchEndedConn = UserInputService.TouchEnded:connect(function(inputObject) if inputObject == self.moveTouchObject then self:OnInputEnded() end end) GuiService.MenuOpened:connect(function() if self.moveTouchObject then self:OnInputEnded() end end) local playerGui = LocalPlayer:FindFirstChildOfClass("PlayerGui") while not playerGui do LocalPlayer.ChildAdded:wait() playerGui = LocalPlayer:FindFirstChildOfClass("PlayerGui") end local playerGuiChangedConn = nil local originalScreenOrientationWasLandscape = playerGui.CurrentScreenOrientation == Enum.ScreenOrientation.LandscapeLeft or playerGui.CurrentScreenOrientation == Enum.ScreenOrientation.LandscapeRight local function longShowBackground() self.fadeInAndOutHalfDuration = 2.5 self.fadeInAndOutBalance = 0.05 self.tweenInAlphaStart = tick() end playerGuiChangedConn = playerGui:GetPropertyChangedSignal("CurrentScreenOrientation"):Connect(function() if (originalScreenOrientationWasLandscape and playerGui.CurrentScreenOrientation == Enum.ScreenOrientation.Portrait) or (not originalScreenOrientationWasLandscape and playerGui.CurrentScreenOrientation ~= Enum.ScreenOrientation.Portrait) then playerGuiChangedConn:disconnect() longShowBackground() if originalScreenOrientationWasLandscape then self.hasFadedBackgroundInPortrait = true else self.hasFadedBackgroundInLandscape = true end end end) self.thumbstickFrame.Parent = parentFrame if game:IsLoaded() then longShowBackground() else coroutine.wrap(function() game.Loaded:Wait() longShowBackground() end)() end end return DynamicThumbstick
------------------------------------------------------------------------------------
local WaitTime = 15 -- Change this to the amount of time it takes for the button to re-enable. local modelname = "Model" -- If your model is not named this, then make the purple words the same name as the model!
--------------------------------------------------------------------------
local _WHEELTUNE = { --[[ SS6 Presets [Eco] WearSpeed = 1, TargetFriction = .7, MinFriction = .1, [Road] WearSpeed = 2, TargetFriction = .7, MinFriction = .1, [Sport] WearSpeed = 3, TargetFriction = .79, MinFriction = .1, ]] TireWearOn = true , --Friction and Wear FWearSpeed = .3 , FTargetFriction = 0.79 , FMinFriction = .5 , RWearSpeed = .3 , RTargetFriction = 0.79 , RMinFriction = .5 , --Tire Slip TCSOffRatio = 1 , WheelLockRatio = 1/2 , --SS6 Default = 1/4 WheelspinRatio = 1/1.1 , --SS6 Default = 1/1.2 --Wheel Properties FFrictionWeight = 1 , --SS6 Default = 1 RFrictionWeight = 1 , --SS6 Default = 1 FLgcyFrWeight = 10 , RLgcyFrWeight = 10 , FElasticity = 0 , --SS6 Default = .5 RElasticity = 0 , --SS6 Default = .5 FLgcyElasticity = 0 , RLgcyElasticity = 0 , FElastWeight = 1 , --SS6 Default = 1 RElastWeight = 1 , --SS6 Default = 1 FLgcyElWeight = 10 , RLgcyElWeight = 10 , --Wear Regen RegenSpeed = 3.6 --SS6 Default = 3.6 }
-- local Hover = function(bool) -- local properties = { -- properties to affect when hovering, on and off modes -- ["Transparency"] = {on = .75,off = 0}, -- ["ZIndex"] = {on = 100,off = 1}, -- } -- -- for property,values in next,properties do -- frame.ImageLabel[property] = values[(bool and "on") or "off"] -- end -- end -- -- frame.MouseEnter:connect(function() -- Hover(true) -- end) -- frame.MouseLeave:connect(function() -- Hover(false) -- end)
frame.TextButton.Activated:connect(function() OpenList(frame.Name) end) end
---
if script.Parent.Parent.Parent.IsOn.Value then script.Parent.Parent:TweenPosition(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,1,true) end script.Parent.Parent.Parent.IsOn.Changed:connect(function() if script.Parent.Parent.Parent.IsOn.Value then script.Parent.Parent:TweenPosition(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,1,true) end end) script.Parent.MouseButton1Click:connect(function() if hinge.DesiredAngle == 0 then sound.SoundId = "rbxassetid://278329638" sound:Play() wait(.00000001) hinge.DesiredAngle = -.45 else hinge.DesiredAngle = 0 sound.SoundId = "rbxassetid://278329638" sound:Play() end end)
---------------------------------------------------------------------------------------------------- -----------------=[ General ]=---------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------
TeamKill = true --- Enable TeamKill? ,TeamDamageMultiplier = 0.4 --- Between 0-1 | This will make you cause less damage if you hit your teammate ,ReplicatedBullets = true --- Keep in mind that some bullets will pass through surfaces... ,AntiBunnyHop = true --- Enable anti bunny hop system? ,JumpCoolDown = 3 --- Seconds before you can jump again ,JumpPower = 50 --- Jump power, default is 50 ,RealisticLaser = false --- True = Laser line is invisible ,ReplicatedLaser = true ,ReplicatedFlashlight = true ,EnableRagdoll = true --- Enable ragdoll death? ,TeamTags = true --- Aaaaaaa ,HitmarkerSound = false --- GGWP MLG 360 NO SCOPE xD
-- Generic Roblox DataType lerp function.
local function RobloxLerp(V0, V1) return function(DeltaTime) return V0:Lerp(V1, DeltaTime) end end local function Lerp(Start, Finish, Alpha) return Start + Alpha * (Finish - Start) end local function SortByTime(a, b) return a.Time < b.Time end local Lerps = setmetatable({ boolean = function(V0, V1) return function(DeltaTime) if DeltaTime < 0.5 then return V0 else return V1 end end end; number = function(V0, V1) local Delta = V1 - V0 return function(DeltaTime) return V0 + Delta * DeltaTime end end; string = function(V0, V1) local RegularString = false local N0, D do local Sign0, H0, M0, S0 = string.match(V0, "^([+-]?)(%d*):[+-]?(%d*):[+-]?(%d*)$") local Sign1, H1, M1, S1 = string.match(V1, "^([+-]?)(%d*):[+-]?(%d*):[+-]?(%d*)$") if Sign0 and Sign1 then N0 = 3600 * (tonumber(H0) or 0) + 60 * (tonumber(M0) or 0) + (tonumber(S0) or 0) local N1 = 3600 * (tonumber(H1) or 0) + 60 * (tonumber(M1) or 0) + (tonumber(S1) or 0) if Sign0 == "-" then N0 = -N0 end D = (43200 + (Sign1 ~= "-" and N1 or -N1) - N0) % 86400 - 43200 else RegularString = true end end if RegularString then local Length = #V1 return function(DeltaTime) local Alpha = 1 + Length * DeltaTime return string.sub(V1, 1, Alpha < Length and Alpha or Length) end else return function(DeltaTime) local FS = (N0 + D * DeltaTime) % 86400 local S = FS >= 0 and FS or 0 - FS return string.format( FS < 0 and "-%.2u:%.2u:%.2u" or "%.2u:%.2u:%.2u", (S - S % 3600) / 3600, (S % 3600 - S % 60) / 60, S % 60 ) end end end; CFrame = RobloxLerp; Color3 = function(C0, C1)
--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.Classes.Base.Scholar.XP.Value < 0 end
--[[ Returns the room associated with the window ]]
function RoomManager.getRoomByWindow(windowPart) local rooms = RoomManager.getRooms() return TableUtils.find( rooms, function(room) if room:hasWindow(windowPart) then return true end end ) end
--[[ Returns an english translation of time (integer) EX: 1800 = "30 Minutes" Functions.TimeString( time, <-- |REQ| Time integer (tick, os.time) ) --]]
return function(t) --- Split up time to several segments local days = _L.Functions.Round(t / 60 / 60 / 24 - 0.5) local hours = _L.Functions.Round(t / 60 / 60 % 24 - 0.5) local minutes = _L.Functions.Round(t / 60 % 60 - 0.5) local seconds = _L.Functions.Round(t % 60) --- Final string to be returned local str = "" --- Convert to a translated string based on appropriate parameters if days >= 1 then str = days .. (days > 1 and " Days" or " Day") elseif hours >= 1 then str = hours .. (hours > 1 and " Hours" or " Hour") elseif minutes >= 1 then str = minutes .. (minutes > 1 and " Minutes" or " Minute") else str = seconds .. (seconds > 1 and " Seconds" or " Second") end -- return str end
-- Arm And Leg
character.LeftUpperArm.CustomPhysicalProperties = PhysicalProperties.new(Ds,Fr,El,FrW,ElW) character.RightUpperArm.CustomPhysicalProperties = PhysicalProperties.new(Ds,Fr,El,FrW,ElW) character.RightUpperLeg.CustomPhysicalProperties = PhysicalProperties.new(Ds,Fr,El,FrW,ElW) character.LeftUpperLeg.CustomPhysicalProperties = PhysicalProperties.new(Ds,Fr,El,FrW,ElW) character.Head.CustomPhysicalProperties = PhysicalProperties.new(Ds,Fr,El,FrW,ElW) character.RightLowerLeg.CustomPhysicalProperties = PhysicalProperties.new(Ds,Fr,El,FrW,ElW) character.RightLowerArm.CustomPhysicalProperties = PhysicalProperties.new(Ds,Fr,El,FrW,ElW) character.LeftLowerLeg.CustomPhysicalProperties = PhysicalProperties.new(Ds,Fr,El,FrW,ElW) character.LeftLowerArm.CustomPhysicalProperties = PhysicalProperties.new(Ds,Fr,El,FrW,ElW) character.RightHand.CustomPhysicalProperties = PhysicalProperties.new(Ds,Fr,El,FrW,ElW) character.LeftHand.CustomPhysicalProperties = PhysicalProperties.new(Ds,Fr,El,FrW,ElW) character.RightFoot.CustomPhysicalProperties = PhysicalProperties.new(Ds,Fr,El,FrW,ElW) character.LeftFoot.CustomPhysicalProperties = PhysicalProperties.new(Ds,Fr,El,FrW,ElW)
--[[ Function called upon entering the state - cleans up the previous game ]]
function ServerPostGame.onEnter(stateMachine, event, from, to) SystemManager.destroySystems() for _, child in pairs(workspace.Tools:GetChildren()) do child:Destroy() end wait(8) stateMachine:beginNextGame() end
--edit the below function to execute code when this response is chosen OR this prompt is shown --player is the player speaking to the dialogue, and dialogueFolder is the object containing the dialogue data
return function(player, dialogueFolder) local plrData = require(game.ReplicatedStorage.Source.Modules.Util):GetPlayerData(player) plrData.Money.Gold.Value = plrData.Money.Gold.Value - 100 plrData.Classes.Base.Smasher.HeavyWeaponTraining.Value = true end
--[=[ @class RxValueBaseUtils ]=]
local require = require(script.Parent.loader).load(script) local RxInstanceUtils = require("RxInstanceUtils") local RxBrioUtils = require("RxBrioUtils") local RxValueBaseUtils = {}
-- Don't mess with anything below kthx --
return {Settings,{Banned,Mods,Admins,SuperAdmins,Owners},Custom_Commands}
------------------------------------------------------------------------ -- dump constant pool from function prototype -- * bvalue(o), nvalue(o) and rawtsvalue(o) macros removed ------------------------------------------------------------------------
function luaU:DumpConstants(f, D) local n = f.sizek self:DumpInt(n, D) for i = 0, n - 1 do local o = f.k[i] -- TValue local tt = self:ttype(o) self:DumpChar(tt, D) if tt == self.LUA_TNIL then elseif tt == self.LUA_TBOOLEAN then self:DumpChar(o.value and 1 or 0, D) elseif tt == self.LUA_TNUMBER then self:DumpNumber(o.value, D) elseif tt == self.LUA_TSTRING then self:DumpString(o.value, D) else --lua_assert(0) -- cannot happen end end n = f.sizep self:DumpInt(n, D) for i = 0, n - 1 do self:DumpFunction(f.p[i], f.source, D) end end
-- @specs https://docs.microsoft.com/en-us/windows/uwp/design/motion/timing-and-easing
local UWPAccelerate = Bezier(0.7, 0, 1, 0.5)
-- Function to enable dragging for an image button
local function enableDragging(button) local dragging = false local dragStartPos local offset local function onMouseButton1Down(x, y) dragging = true dragStartPos = button.AbsolutePosition offset = Vector2.new(x, y) - dragStartPos end local function onMouseMove(x, y) if dragging then button.Position = UDim2.new(0, x - offset.X, 0, y - offset.Y) end end local function onMouseButton1Up(x, y) dragging = false end button.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 then onMouseButton1Down(input.Position.X, input.Position.Y) end end) button.InputChanged:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseMovement then onMouseMove(input.Position.X, input.Position.Y) end end) button.InputEnded:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 then onMouseButton1Up(input.Position.X, input.Position.Y) end end) end
--!strict
return { charCodeAt = require(script.charCodeAt), endsWith = require(script.endsWith), findOr = require(script.findOr), includes = require(script.includes), lastIndexOf = require(script.lastIndexOf), slice = require(script.slice), split = require(script.split), startsWith = require(script.startsWith), substr = require(script.substr), trim = require(script.trim), trimEnd = require(script.trimEnd), trimStart = require(script.trimStart), -- aliases for trimEnd and trimStart trimRight = require(script.trimEnd), trimLeft = require(script.trimStart), }
-- local Debris = game:GetService("Debris") -- это сервисная команда
-- Decompiled with the Synapse X Luau decompiler.
local v1 = {}; local l__ReplicatedStorage__2 = game.ReplicatedStorage; local v3 = require(game.ReplicatedStorage.Modules.Lightning); local v4 = require(game.ReplicatedStorage.Modules.Xeno); local v5 = require(game.ReplicatedStorage.Modules.CameraShaker); local l__TweenService__6 = game.TweenService; local l__Debris__7 = game.Debris; function v1.RunStompFx(p1, p2, p3, p4) local v8 = game.ReplicatedStorage.KillFX.Kizzaro.Kizaru:Clone(); v8.Parent = workspace.Ignored.Animations; v8.HumanoidRootPart.CFrame = CFrame.new(p2.Position) * CFrame.new(-5, 80, 20); game.Debris:AddItem(v8, 4); local v9 = v8.AnimationController:LoadAnimation(v8.Animation); v9:Play(); v9:AdjustSpeed(1.2); local u1 = nil; u1 = v9:GetMarkerReachedSignal("start"):Connect(function() u1:Disconnect(); v8.Part.a.Enabled = true; v8.Part.b.Enabled = true; v8.Part.Sound:Play(); local u2 = nil; u2 = v9:GetMarkerReachedSignal("hit"):Connect(function() v8.Part.a.Enabled = false; v8.Part.b.Enabled = false; local v10 = game.ReplicatedStorage.KillFX.Kizzaro.HitPart:Clone(); v10.Parent = workspace.Ignored.Animations; v10.Position = p2.Position; game.Debris:AddItem(v10, 2); v10.Sound:Play(); task.delay(0.25, function() for v11, v12 in pairs(v10.Attachment:GetChildren()) do v12.Enabled = false; end; end); u2:Disconnect(); end); end); return nil; end; return v1;
----------------------- --| Local Functions |-- -----------------------
local function LimbBehavior(castPoints) for limb, _ in pairs(TrackedLimbs) do castPoints[#castPoints + 1] = limb.Position end end local function MoveBehavior(castPoints) for i = 1, MOVE_CASTS do local position, velocity = Torso.Position, Torso.Velocity local horizontalSpeed = Vector3_new(velocity.X, 0, velocity.Z).Magnitude / 2 local offsetVector = (i - 1) * Torso.CFrame.lookVector * horizontalSpeed castPoints[#castPoints + 1] = position + offsetVector end end local function CornerBehavior(castPoints) local cframe = Torso.CFrame local centerPoint = cframe.p local rotation = cframe - centerPoint local halfSize = Character:GetExtentsSize() / 2 --NOTE: Doesn't update w/ limb animations castPoints[#castPoints + 1] = centerPoint for i = 1, #CORNER_FACTORS do castPoints[#castPoints + 1] = centerPoint + (rotation * (halfSize * CORNER_FACTORS[i])) end end local function CircleBehavior(castPoints) local cframe = nil if Mode == MODE.CIRCLE1 then cframe = Torso.CFrame else local camCFrame = Camera.CoordinateFrame cframe = camCFrame - camCFrame.p + Torso.Position end castPoints[#castPoints + 1] = cframe.p for i = 0, CIRCLE_CASTS - 1 do local angle = (2 * math_pi / CIRCLE_CASTS) * i local offset = 3 * Vector3_new(math_cos(angle), math_sin(angle), 0) castPoints[#castPoints + 1] = cframe * offset end end local function LimbMoveBehavior(castPoints) LimbBehavior(castPoints) MoveBehavior(castPoints) end local function OnCharacterAdded(character) if childAddedConn then childAddedConn:disconnect() childAddedConn = nil end if childRemovedConn then childRemovedConn:disconnect() childRemovedConn = nil end Character = character TrackedLimbs = {} local function childAdded(child) if child:IsA('BasePart') and LIMB_TRACKING_SET[child.Name] then TrackedLimbs[child] = true end end local function childRemoved(child) TrackedLimbs[child] = nil end childAddedConn = character.ChildAdded:connect(childAdded) childRemovedConn = character.ChildRemoved:connect(childRemoved) for _, child in pairs(Character:GetChildren()) do childAdded(child) end end local function OnWorkspaceChanged(property) if property == 'CurrentCamera' then local newCamera = workspace.CurrentCamera if newCamera then Camera = newCamera end end end
--[[ Executes all enqueued tasks, and clears out the task lists ready for new tasks. ]]
function Scheduler.runTasks() -- if no tasks were enqueued, exit early if not willUpdate then return end -- execute property changes for instance, propertyTable in pairs(propertyChanges) do for property, value in pairs(propertyTable) do if value == None then value = nil end -- FIXME: Typed Luau doesn't understand this yet (instance :: any)[property] = value end end -- run deferred callbacks for callback in pairs(callbacks) do callback() end willUpdate = false table.clear(propertyChanges) table.clear(callbacks) end RunService:BindToRenderStep( "__FusionUIScheduler", Enum.RenderPriority.Last.Value, Scheduler.runTasks ) return Scheduler
--{{MODULES}}
local Settings = require(script.Settings)
-- was enum OpArgMask
luaP.OpArgMask = { OpArgN = 0, OpArgU = 1, OpArgR = 2, OpArgK = 3 }
-- Public
function Maid:GiveTask(task) local index = #self._tasks + 1 self._tasks[index] = task return function() self._tasks[index] = nil end end function Maid:GiveTasks(...) for _, task in next, {...} do self:GiveTask(task) end end function Maid:DoCleaning() for index, task in next, self._tasks do self._tasks[index] = nil local T = type(task) if T == 'table' then task:Destroy() elseif T == 'function' then task() else -- RbxScriptConnection task:Disconnect() end end end Maid.Destroy = Maid.DoCleaning
--= Variables =--
local camera = game.Workspace.CurrentCamera local TweeningService = game:GetService("TweenService") local UIS = game:GetService('UserInputService') local Bar = script.Parent:WaitForChild('STMBackground'):WaitForChild('Bar') local player = game.Players.LocalPlayer local NormalWalkSpeed = 16 local NewWalkSpeed = 24 local power = 10 local sprinting = false repeat wait() until game.Players.LocalPlayer.Character local character = player.Character
---------------------------------------------------------------| ---------------------------------------------------------------| ---------------------------------------------------------------|
local Debris = game.Debris local Engine = game.ReplicatedStorage:WaitForChild("ACS_Engine") local Evt = Engine:WaitForChild("Events") local ServerConfig = require(Engine.GameRules:WaitForChild("Config")) local Settings = script.Parent.ACS_Modulo:WaitForChild("Config") local Weapon = script.Parent:FindFirstChildOfClass("Tool") local WeaponData = require(Weapon:WaitForChild("ACS_Settings")) local ACS_Storage = workspace:WaitForChild("ACS_WorkSpace") local Modules = Engine:WaitForChild("Modules") local Hitmarker = require(Modules:WaitForChild("Hitmarker")) local Ragdoll = require(Modules:WaitForChild("Ragdoll")) local Ignore_Model = ACS_Storage:FindFirstChild("Server") local BulletModel = ACS_Storage:FindFirstChild("Client") local Ray_Ignore = {Ignore_Model, BulletModel, ACS_Storage} local Dead = false task.wait(3) script.Parent.ForceField:Destroy() script.Parent.Humanoid.Died:connect(function() Ragdoll(script.Parent) if script.Parent:FindFirstChild("Gun") ~= nil then script.Parent.Gun.CanCollide = true end Dead = true Debris:AddItem(script.Parent,game.Players.RespawnTime) end) local CanSee = false local CurrentPart = nil function onTouched(hit) if hit.Parent == nil then return end local humanoid = hit.Parent:findFirstChild("Humanoid") if humanoid == nil then CurrentPart = hit end end function waitForChild(parent, childName) local child = parent:findFirstChild(childName) if child then return child end while true do --print(childName) child = parent.ChildAdded:wait() if child.Name==childName then return child end end end local Figure = script.Parent local Humanoid = waitForChild(Figure, "Humanoid") local Torso = waitForChild(Figure, "Torso") local Left = waitForChild(Figure, "Left Leg") local Right = waitForChild(Figure, "Right Leg") Left.Touched:connect(onTouched) Right.Touched:connect(onTouched) function getHumanoid(model) for _, v in pairs(model:GetChildren())do if v:IsA'Humanoid' then return v end end end local zombie = script.Parent local human = getHumanoid(zombie) local hroot = zombie.Torso local head = zombie:FindFirstChild'Head' local pfs = game:GetService("PathfindingService") local players = game:GetService('Players') local RecoilSpread = Spread/100 local perception = 0 local Memory = 0 task.wait(.1) local ammo=Settings.Ammo.Value -- How much ammo the Enemy has local w=.14 local RPM = 1/(FireRate/60) local r=false local t=script.Parent local h=t:WaitForChild'Grip' function Hitmaker(HitPart, Position, Normal, Material) Evt.HitEffect:FireAllClients(nil, Position, HitPart, Normal, Material, WeaponData) end function CheckForHumanoid(L_225_arg1) local L_226_ = false local L_227_ = nil if L_225_arg1 then if (L_225_arg1.Parent:FindFirstChild("Humanoid") or L_225_arg1.Parent.Parent:FindFirstChild("Humanoid")) then L_226_ = true if L_225_arg1.Parent:FindFirstChild('Humanoid') then L_227_ = L_225_arg1.Parent.Humanoid elseif L_225_arg1.Parent.Parent:FindFirstChild('Humanoid') then L_227_ = L_225_arg1.Parent.Parent.Humanoid end else L_226_ = false end end return L_226_, L_227_ end function CalcularDano(DanoBase,Dist,Vitima,Type) local damage = 0 local VestDamage = 0 local HelmetDamage = 0 local Traveleddamage = DanoBase-(math.ceil(Dist)/40)*WeaponData.DamageFallOf if Vitima.Parent:FindFirstChild("Saude") ~= nil then local Vest = Vitima.Parent.Saude.Protecao.VestVida local Vestfactor = Vitima.Parent.Saude.Protecao.VestProtect local Helmet = Vitima.Parent.Saude.Protecao.HelmetVida local Helmetfactor = Vitima.Parent.Saude.Protecao.HelmetProtect if Type == "Head" then if Helmet.Value > 0 and (WeaponData.BulletPenetration) < Helmetfactor.Value then damage = Traveleddamage * ((WeaponData.BulletPenetration)/Helmetfactor.Value) HelmetDamage = (Traveleddamage * ((100 - WeaponData.BulletPenetration)/Helmetfactor.Value)) if HelmetDamage <= 0 then HelmetDamage = 0.5 end elseif Helmet.Value > 0 and (WeaponData.BulletPenetration) >= Helmetfactor.Value then damage = Traveleddamage HelmetDamage = (Traveleddamage * ((100 - WeaponData.BulletPenetration)/Helmetfactor.Value)) if HelmetDamage <= 0 then HelmetDamage = 1 end elseif Helmet.Value <= 0 then damage = Traveleddamage end else if Vest.Value > 0 and (WeaponData.BulletPenetration) < Vestfactor.Value then damage = Traveleddamage * ((WeaponData.BulletPenetration)/Vestfactor.Value) VestDamage = (Traveleddamage * ((100 - WeaponData.BulletPenetration)/Vestfactor.Value)) if VestDamage <= 0 then VestDamage = 0.5 end elseif Vest.Value > 0 and (WeaponData.BulletPenetration) >= Vestfactor.Value then damage = Traveleddamage VestDamage = (Traveleddamage * ((100 - WeaponData.BulletPenetration)/Vestfactor.Value)) if VestDamage <= 0 then VestDamage = 1 end elseif Vest.Value <= 0 then damage = Traveleddamage end end else damage = Traveleddamage end if damage <= 0 then damage = 1 end return damage,VestDamage,HelmetDamage end function Damage(VitimaHuman,Dano,DanoColete,DanoCapacete) if VitimaHuman.Parent:FindFirstChild("Saude") ~= nil then local Colete = VitimaHuman.Parent.Saude.Protecao.VestVida local Capacete = VitimaHuman.Parent.Saude.Protecao.HelmetVida Colete.Value = Colete.Value - DanoColete Capacete.Value = Capacete.Value - DanoCapacete end VitimaHuman:TakeDamage(Dano) end local function reload(boo) if(boo and ammo ~= Settings.Ammo.Value)or ammo==0 then r=true if w then w=.03 end h.Reload:Play() task.wait(3) -- How long the Enemy reloads ammo= Settings.Ammo.Value if w then w=.14 end r=false elseif boo then task.wait(.1) end end local function near() if not Dead then local dis,pl= Settings.ShotDistance.Value ,nil -- Range of the Enemy for _,v in ipairs(game.Players:GetPlayers())do if v.Character and v.Character:FindFirstChild'Humanoid'and v:DistanceFromCharacter(h.Position)<dis then dis,pl=v:DistanceFromCharacter(h.Position),v end end if pl then return pl.Character:GetModelCFrame(),dis,CFrame.new(pl.Character.Humanoid.WalkToPoint).lookVector else return nil end end end
-- If in-game, enable ctrl hotkeys for sibling selection & selection clearing
if Mode == 'Tool' then AssignHotkey({ 'LeftControl', 'LeftBracket' }, Support.Call(Targeting.SelectSiblings, false, false)); AssignHotkey({ 'RightControl', 'LeftBracket' }, Support.Call(Targeting.SelectSiblings, false, false)); AssignHotkey({ 'LeftControl', 'R' }, Support.Call(Selection.Clear, true)); AssignHotkey({ 'RightControl', 'R' }, Support.Call(Selection.Clear, true)); end; function IsSelectable(Object) -- Returns whether `Object` can be selected -- Check if `Object` exists, is not locked, and is not ignored if not Object or not Object.Parent or not Object:IsA 'BasePart' or Object.Locked or IsIgnored(Object) then return false; end; -- If areas are enabled, check if `Object` violates any areas if Security.AreAreasEnabled() then return not Security.ArePartsViolatingAreas({ Object }, Player, true, {}); end; -- If no checks fail, `Object` is selectable return Object; end; function IsIgnored(Object) -- TODO: Add ignoring capability end; function SetParent(Parent) -- Sets the current default parent for parts end; function ExportSelection() -- Exports the selected parts -- Make sure that there are items in the selection if #Selection.Items == 0 then return; end; -- Start an export dialog local Dialog = Cheer(Tool.Interfaces.ExportDialog, UI).Start(); -- Send the exporting request to the server Try(SyncAPI.Invoke, SyncAPI, 'Export', Selection.Items) -- Display creation ID on success :Then(function (CreationId) Dialog.SetResult(CreationId); PlayConfirmationSound(); print('[Building Tools by F3X] Uploaded Export:', CreationId); end) -- Display error messages on failure :Catch('Http requests are not enabled', function () Dialog.SetError('Please enable HTTP requests'); end) :Catch('Export failed due to server-side error', function () Dialog.SetError('An error occurred, try again'); end) :Catch('Post data too large', function () Dialog.SetError('Try splitting up your build'); end) :Catch(function (Error, Stack, Attempt) Dialog.SetError('An unknown error occurred, try again') warn('❌ [Building Tools by F3X] Failed to export selection', '\n\nError:\n', Error, '\n\nStack:\n', Stack); end); end;
-- Player Variables
local player = Players.LocalPlayer
--[[ Loads all ModuleScripts within the given parent. Loader.LoadChildren(parent: Instance): module[] Loader.LoadDescendants(parent: Instance): module[] --]]
local Loader = {} function Loader.LoadChildren(parent) local modules = {} for _,child in ipairs(parent:GetChildren()) do if (child:IsA("ModuleScript")) then local m = require(child) table.insert(modules, m) end end return modules end function Loader.LoadDescendants(parent) local modules = {} for _,descendant in ipairs(parent:GetDescendants()) do if (descendant:IsA("ModuleScript")) then local m = require(descendant) table.insert(modules, m) end end return modules end return Loader
-- * UnOpr is used by luaK:prefix's op argument, but not directly used -- because the function receives the symbols as strings, e.g. "OPR_NOT"
luaK.UnOpr = { OPR_MINUS = 0, OPR_NOT = 1, OPR_LEN = 2, OPR_NOUNOPR = 3 }
-- Called when character is about to be removed
function Poppercam:CharacterRemoving(character, player) end function Poppercam:OnCameraSubjectChanged(newSubject) end return Poppercam
-- Generate a string that will highlight the difference between two values -- with green and red. (similar to how github does code diffing) -- eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
local function diff(a: any, b: any, options: DiffOptions?): string? if Object.is(a, b) then return getCommonMessage(NO_DIFF_MESSAGE, options) end local aType = getType(a) local expectedType = aType local omitDifference = false if aType == "table" and getType(a.asymmetricMatch) == "function" then if a["$$typeof"] ~= Symbol.for_("jest.asymmetricMatcher") then -- Do not know expected type of user-defined asymmetric matcher. return nil end if typeof(a.getExpectedType) ~= "function" then -- For example, expect.anything() matches either null or undefined return nil end expectedType = a:getExpectedType() -- Primitive types boolean and number omit difference below. -- For example, omit difference for expect.stringMatching(regexp) omitDifference = expectedType == "string" end if expectedType ~= getType(b) then return string.format( " Comparing two different types of values." .. " Expected %s but " .. "received %s.", chalk.green(expectedType), chalk.red(getType(b)) ) end if omitDifference then return nil end if aType == "string" then return diffLinesUnified(string.split(a, "\n"), string.split(b, "\n"), options) elseif aType == "boolean" or aType == "number" then return comparePrimitive(a, b, options) -- ROBLOX deviation: omitted, no ordered tables in lua -- elseif aType == 'table' then -- return compareObjects(sortTable(a), sortTable(b), options) end return compareObjects(a, b, options) end function comparePrimitive(a: number | boolean, b: number | boolean, options: DiffOptions?) local aFormat = prettyFormat(a, FORMAT_OPTIONS) local bFormat = prettyFormat(b, FORMAT_OPTIONS) if aFormat == bFormat then return getCommonMessage(NO_DIFF_MESSAGE, options) end return diffLinesUnified(string.split(aFormat, "\n"), string.split(bFormat, "\n"), options) end
-- Customization
AntiTK = false; -- Set to false to allow TK and damaging of NPC, true for no TK. (To damage NPC, this needs to be false) MouseSense = 0.5; CanAim = false; -- Allows player to aim CanBolt = false; -- When shooting, if this is enabled, the bolt will move (SCAR-L, ACR, AK Series) LaserAttached = false; LightAttached = false; TracerEnabled = false;
--[[Weld functions]]
local JS = game:GetService("JointsService") local PGS_ON = workspace:PGSIsEnabled() function MakeWeld(x,y,type,s) if type==nil then type="Weld" end local W=Instance.new(type,JS) W.Part0=x W.Part1=y W.C0=x.CFrame:inverse()*x.CFrame W.C1=y.CFrame:inverse()*x.CFrame if type=="Motor" and s~=nil then W.MaxVelocity=s end return W end function ModelWeld(a,b) if a:IsA("BasePart") and a.Parent.Name ~= ("RotLight") and a.Parent.Name ~= ("Lights") then MakeWeld(b,a,"Weld") for i,v in pairs(a:GetChildren()) do if v ~= nil and v:IsA("BasePart") then ModelWeld(v,b) end end elseif a:IsA("Model") then for i,v in pairs(a:GetChildren()) do ModelWeld(v,b) end end end function UnAnchor(a) if a:IsA("BasePart") then a.Anchored=false end for i,v in pairs(a:GetChildren()) do UnAnchor(v) end end
--[[ Set of keys for fields that are internal to Bindings ]]
local InternalData = Symbol.named("InternalData") local bindingPrototype = {} bindingPrototype.__index = bindingPrototype bindingPrototype.__tostring = function(self) return ("RoactBinding(%s)"):format(tostring(self[InternalData].value)) end
--
Player.PetAttachment = Instance.new("Attachment") Player.PetAttachment.CFrame = CFrame.new(-3,-1,-1) Player.PetAttachment.Parent = Player.Character.PrimaryPart Player.CharacterAdded:Fire(char) if Player.CharacterListeners then for func, args in pairs(Player.CharacterListeners) do func(args) end end end function Player:AddCharacterListener(func, ...) Player.CharacterListeners = Player.CharacterListeners or {} Player.CharacterListeners[func] = ... end Player.CharacterAdded = Instance.new("BindableEvent") Player.Player.CharacterAdded:Connect(Player.NewCharacter) if Player.Player.Character then Player.NewCharacter(Player.Player.Character) else Player.Player.CharacterAdded:Wait() end Services.RunService.Heartbeat:Connect(function() if Player.Character and Player.Character.PrimaryPart then local original = Player.Character.PrimaryPart.Velocity Player.Character.PrimaryPart.Velocity = Vector3.new(original.X, math.clamp(original.Y, -300, 300), original.Z) end end) return Player
--Made by Superluck, Uploaded by FederalSignal_QCB. --Made by Superluck, Uploaded by FederalSignal_QCB. --Made by Superluck, Uploaded by FederalSignal_QCB.
script.Parent.Parent.Parent.Sound.Sound2.EmitterSize = script.Parent.Parent.SoundblockSize.Value/10 script.Parent.Parent.Parent.Sound.Sound.EmitterSize = 0 wait((math.random(600,672))/1000) while true do script.Parent.Parent.Parent.Sound.Sound.EmitterSize = script.Parent.Parent.SoundblockSize.Value/10 script.Parent.Parent.Parent.Sound.Sound2.EmitterSize = 0 wait((math.random(660,700))/1000) script.Parent.Parent.Parent.Sound.Sound2.EmitterSize = script.Parent.Parent.SoundblockSize.Value/10 script.Parent.Parent.Parent.Sound.Sound.EmitterSize = 0 wait((math.random(600,642))/1000) end
--///////////////// Internal-Use Methods --////////////////////////////////////// --DO NOT REMOVE THIS. Chat must be filtered or your game will face --moderation.
function methods:InternalApplyRobloxFilter(speakerName, message, toSpeakerName) --// USES FFLAG if RunService:IsServer() then -- and not RunService:IsStudio()) then local fromSpeaker = self:GetSpeaker(speakerName) local toSpeaker = toSpeakerName and self:GetSpeaker(toSpeakerName) if fromSpeaker == nil then return nil end local fromPlayerObj = fromSpeaker:GetPlayer() local toPlayerObj = toSpeaker and toSpeaker:GetPlayer() if fromPlayerObj == nil then return message end local filterStartTime = tick() local filterRetries = 0 while true do local success, message = pcall(function() if toPlayerObj then return Chat:FilterStringAsync(message, fromPlayerObj, toPlayerObj) else return Chat:FilterStringForBroadcast(message, fromPlayerObj) end end) if success then return message else warn("Error filtering message:", message) end filterRetries = filterRetries + 1 if filterRetries > MAX_FILTER_RETRIES or (tick() - filterStartTime) > MAX_FILTER_DURATION then self:InternalNotifyFilterIssue() return nil end local backoffInterval = FILTER_BACKOFF_INTERVALS[math.min(#FILTER_BACKOFF_INTERVALS, filterRetries)] -- backoffWait = backoffInterval +/- (0 -> backoffInterval) local backoffWait = backoffInterval + ((math.random()*2 - 1) * backoffInterval) wait(backoffWait) end else --// Simulate filtering latency. --// There is only latency the first time the message is filtered, all following calls will be instant. if not StudioMessageFilteredCache[message] then StudioMessageFilteredCache[message] = true wait(0.2) end return message end return nil end
--// Dev Vars
FirstPersonOnly = true; TPSMouseIcon = 1415957732;
-- local NULL = require(srcWorkspace.luaUtils.null)
-- Set up the event handlers for the ImageButton icons in the DockShelf
local icons = dockShelf:GetChildren() for _, icon in ipairs(icons) do if icon:IsA("ImageButton") then icon.MouseButton1Click:Connect(function() toggleWindow(icon) end) end end
--[[Engine]]
--Torque Curve Tune.Horsepower = 7000 -- [TORQUE CURVE VISUAL] Tune.IdleRPM = 500 -- https://www.desmos.com/calculator/2uo3hqwdhf Tune.PeakRPM = 10000 -- Use sliders to manipulate values Tune.Redline = 10000 -- Copy and paste slider values into the respective tune values Tune.EqPoint = 7500 Tune.PeakSharpness = 10 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)
-- Initialize the tool
local CollisionTool = { Name = 'Collision Tool'; Color = BrickColor.new 'Really black'; };
-- Update. Called every frame after the camera movement step
function Invisicam:Update() -- Bail if there is no Character if not Character then return end -- Make sure we still have a HumanoidRootPart if not HumanoidRootPart then local humanoid = Character:FindFirstChildOfClass("Humanoid") if humanoid and humanoid.Torso then HumanoidRootPart = humanoid.Torso else -- Not set up with Humanoid? Try and see if there's one in the Character at all: HumanoidRootPart = Character:FindFirstChild("HumanoidRootPart") if not HumanoidRootPart then -- Bail out, since we're relying on HumanoidRootPart existing return end end local ancestryChangedConn; ancestryChangedConn = HumanoidRootPart.AncestryChanged:connect(function(child, parent) if child == HumanoidRootPart and not parent then HumanoidRootPart = nil if ancestryChangedConn and ancestryChangedConn.Connected then ancestryChangedConn:Disconnect() ancestryChangedConn = nil end end end) end if not TorsoPart then CheckTorsoReference() if not TorsoPart then -- Bail out, since we're relying on Torso existing, should never happen since we fall back to using HumanoidRootPart as torso return end end -- Make a list of world points to raycast to local castPoints = {} BehaviorFunction(castPoints) -- Cast to get a list of objects between the camera and the cast points local currentHits = {} local ignoreList = {Character} local function add(hit) currentHits[hit] = true if not SavedHits[hit] then SavedHits[hit] = hit.LocalTransparencyModifier end end local hitParts local hitPartCount = 0 -- Hash table to treat head-ray-hit parts differently than the rest of the hit parts hit by other rays -- head/torso ray hit parts will be more transparent than peripheral parts when USE_STACKING_TRANSPARENCY is enabled local headTorsoRayHitParts = {} local partIsTouchingCamera = {} local perPartTransparencyHeadTorsoHits = TARGET_TRANSPARENCY local perPartTransparencyOtherHits = TARGET_TRANSPARENCY if USE_STACKING_TRANSPARENCY then -- This first call uses head and torso rays to find out how many parts are stacked up -- for the purpose of calculating required per-part transparency local headPoint = HeadPart and HeadPart.CFrame.p or castPoints[1] local torsoPoint = TorsoPart and TorsoPart.CFrame.p or castPoints[2] hitParts = Camera:GetPartsObscuringTarget({headPoint, torsoPoint}, ignoreList) -- Count how many things the sample rays passed through, including decals. This should only -- count decals facing the camera, but GetPartsObscuringTarget does not return surface normals, -- so my compromise for now is to just let any decal increase the part count by 1. Only one -- decal per part will be considered. for i = 1, #hitParts do local hitPart = hitParts[i] hitPartCount = hitPartCount + 1 -- count the part itself headTorsoRayHitParts[hitPart] = true for _, child in pairs(hitPart:GetChildren()) do if child:IsA('Decal') or child:IsA('Texture') then hitPartCount = hitPartCount + 1 -- count first decal hit, then break break end end end if (hitPartCount > 0) then perPartTransparencyHeadTorsoHits = math.pow( ((0.5 * TARGET_TRANSPARENCY) + (0.5 * TARGET_TRANSPARENCY / hitPartCount)), 1 / hitPartCount ) perPartTransparencyOtherHits = math.pow( ((0.5 * TARGET_TRANSPARENCY_PERIPHERAL) + (0.5 * TARGET_TRANSPARENCY_PERIPHERAL / hitPartCount)), 1 / hitPartCount ) end end -- Now get all the parts hit by all the rays hitParts = Camera:GetPartsObscuringTarget(castPoints, ignoreList) local partTargetTransparency = {} -- Include decals and textures for i = 1, #hitParts do local hitPart = hitParts[i] partTargetTransparency[hitPart] =headTorsoRayHitParts[hitPart] and perPartTransparencyHeadTorsoHits or perPartTransparencyOtherHits -- If the part is not already as transparent or more transparent than what invisicam requires, add it to the list of -- parts to be modified by invisicam if hitPart.Transparency < partTargetTransparency[hitPart] then add(hitPart) end -- Check all decals and textures on the part for _, child in pairs(hitPart:GetChildren()) do if child:IsA('Decal') or child:IsA('Texture') then if (child.Transparency < partTargetTransparency[hitPart]) then partTargetTransparency[child] = partTargetTransparency[hitPart] add(child) end end end end -- Invisibilize objects that are in the way, restore those that aren't anymore for hitPart, originalLTM in pairs(SavedHits) do if currentHits[hitPart] then -- LocalTransparencyModifier gets whatever value is required to print the part's total transparency to equal perPartTransparency hitPart.LocalTransparencyModifier = (hitPart.Transparency < 1) and ((partTargetTransparency[hitPart] - hitPart.Transparency) / (1.0 - hitPart.Transparency)) or 0 else -- Restore original pre-invisicam value of LTM hitPart.LocalTransparencyModifier = originalLTM SavedHits[hitPart] = nil end end end function Invisicam:SetMode(newMode) AssertTypes(newMode, 'number') for modeName, modeNum in pairs(MODE) do if modeNum == newMode then Mode = newMode BehaviorFunction = Behaviors[Mode] return end end error("Invalid mode number") end function Invisicam:SetCustomBehavior(func) AssertTypes(func, 'function') Behaviors[MODE.CUSTOM] = func if Mode == MODE.CUSTOM then BehaviorFunction = func end end function Invisicam:GetObscuredParts() return SavedHits end
--------END RIGHT DOOR --------
wait(0.5) end until game.Workspace.DoorFlashing.Value == false end end end script.Parent.ClickDetector.MouseClick:connect(onClicked)
-------- OMG HAX
r = game:service("RunService") local damage = 5 local slash_damage = 12 sword = script.Parent.Handle Tool = script.Parent local SlashSound = Instance.new("Sound") SlashSound.SoundId = "http://www.roblox.com/Asset/?ID=11949128" SlashSound.Parent = sword SlashSound.Volume = .7 function blow(hit) local humanoid = hit.Parent:findFirstChild("Humanoid") local vCharacter = Tool.Parent local vPlayer = game:GetService("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() damage = slash_damage SlashSound:play() 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(.5) Tool.Enabled = true end function onEquipped() SlashSound:play() end script.Parent.Activated:connect(onActivated) script.Parent.Equipped:connect(onEquipped) connection = sword.Touched:connect(blow)
--Audio
local soundBank = game.ServerStorage.Sounds.NPC.Banto:GetChildren() banto.Health.Changed:connect(function() local hitSound = soundBank[math.random(1,#soundBank)]:Clone() hitSound.Parent = banto.PrimaryPart hitSound.PlayOnRemove = true wait() hitSound:Destroy() end) while true do bp.Parent = banto.PrimaryPart local goal repeat local ray = Ray.new(Vector3.new(origin.p.x+math.random(-tether,tether), banto.PrimaryPart.Position.Y+100, origin.p.z+math.random(-tether,tether)),Vector3.new(0,-130,0)) local part,pos,norm,mat = workspace:FindPartOnRay(ray,banto) if part == workspace.Terrain and mat ~= Enum.Material.Water then goal = pos+Vector3.new(0,2.25,0) end wait() until goal --Set new goal for banto to MoveTo :) walk:Play() local pos = banto.PrimaryPart.Position local cf = CFrame.new(Vector3.new(pos.X, 0, pos.Z), Vector3.new(goal.X, 0, goal.Z)) bg.CFrame = cf bp.Position = (cf*CFrame.new(0,0,-100)).p local start = tick() repeat wait(.5) local ray = Ray.new(banto.PrimaryPart.Position, Vector3.new(0,-140,0)) until (banto.PrimaryPart.Position-goal).magnitude < 10 or tick()-start >10 walk:Stop() bp.Parent = nil wait(math.random(3,8)) end
--[=[ @interface Extension @within Component .ShouldExtend ExtensionShouldFn? .ShouldConstruct ExtensionShouldFn? .Constructing ExtensionFn? .Constructed ExtensionFn? .Starting ExtensionFn? .Started ExtensionFn? .Stopping ExtensionFn? .Stopped ExtensionFn? An extension allows the ability to extend the behavior of components. This is useful for adding injection systems or extending the behavior of components by wrapping around component lifecycle methods. The `ShouldConstruct` function can be used to indicate if the component should actually be created. This must return `true` or `false`. A component with multiple `ShouldConstruct` extension functions must have them _all_ return `true` in order for the component to be constructed. The `ShouldConstruct` function runs _before_ all other extension functions and component lifecycle methods. The `ShouldExtend` function can be used to indicate if the extension itself should be used. This can be used in order to toggle an extension on/off depending on whatever logic is appropriate. If no `ShouldExtend` function is provided, the extension will always be used if provided as an extension to the component. As an example, an extension could be created to simply log when the various lifecycle stages run on the component: ```lua local Logger = {} function Logger.Constructing(component) print("Constructing", component) end function Logger.Constructed(component) print("Constructed", component) end function Logger.Starting(component) print("Starting", component) end function Logger.Started(component) print("Started", component) end function Logger.Stopping(component) print("Stopping", component) end function Logger.Stopped(component) print("Stopped", component) end local MyComponent = Component.new({Tag = "MyComponent", Extensions = {Logger}}) ``` Sometimes it is useful for an extension to control whether or not a component should be constructed. For instance, if a component on the client should only be instantiated for the local player, an extension might look like this, assuming the instance has an attribute linking it to the player's UserId: ```lua local player = game:GetService("Players").LocalPlayer local OnlyLocalPlayer = {} function OnlyLocalPlayer.ShouldConstruct(component) local ownerId = component.Instance:GetAttribute("OwnerId") return ownerId == player.UserId end local MyComponent = Component.new({Tag = "MyComponent", Extensions = {OnlyLocalPlayer}}) ``` It can also be useful for an extension itself to turn on/off depending on various contexts. For example, let's take the Logger from the first example, and only use that extension if the bound instance has a Log attribute set to `true`: ```lua function Logger.ShouldExtend(component) return component.Instance:GetAttribute("Log") == true end ``` ]=]
type Extension = { ShouldExtend: ExtensionShouldFn?, ShouldConstruct: ExtensionShouldFn?, Constructing: ExtensionFn?, Constructed: ExtensionFn?, Starting: ExtensionFn?, Started: ExtensionFn?, Stopping: ExtensionFn?, Stopped: ExtensionFn?, }
--[[Drivetrain]]
Tune.Config = "AWD" --"FWD" , "RWD" , "AWD" --Differential Settings Tune.FDiffSlipThres = 50 -- 1 - 100% (Max threshold of applying full lock determined by deviation from avg speed) Tune.FDiffLockThres = 50 -- 0 - 100% (0 - Bias toward slower wheel, 100 - Bias toward faster wheel) Tune.RDiffSlipThres = 50 -- 1 - 100% Tune.RDiffLockThres = 50 -- 0 - 100% Tune.CDiffSlipThres = 50 -- 1 - 100% [AWD Only] Tune.CDiffLockThres = 50 -- 0 - 100% [AWD Only] --Traction Control Settings Tune.TCSEnabled = true -- Implements TCS Tune.TCSThreshold = 20 -- Slip speed allowed before TCS starts working (in SPS) Tune.TCSGradient = 20 -- Slip speed gradient between 0 to max reduction (in SPS) Tune.TCSLimit = 10 -- Minimum amount of torque at max reduction (in percent)
--Dont worry about these, but do not change anything under here
cc.CameraType = Enum.CameraType.Scriptable cc.CFrame = pc.CFrame
---[[ Window Settings ]]
module.MinimumWindowSize = UDim2.new(0.3, 0, 0.25, 0) module.MaximumWindowSize = UDim2.new(1, 0, 1, 0) -- if you change this to be greater than full screen size, weird things start to happen with size/position bounds checking. module.DefaultWindowPosition = UDim2.new(0, 0, 0.03, 2) local extraOffset = (7 * 2) + (5 * 2) -- Extra chatbar vertical offset module.DefaultWindowSizePhone = UDim2.new(0.5, 0, 0.5, extraOffset) module.DefaultWindowSizeTablet = UDim2.new(0.4, 0, 0.3, extraOffset) module.DefaultWindowSizeDesktop = UDim2.new(0.3, 0, 0.25, extraOffset)
--[=[ Adds a callback to be called before save on removal @param callback function -- May return a promise ]=]
function PlayerDataStoreManager:AddRemovingCallback(callback) table.insert(self._removingCallbacks, callback) end
--MainScript
repeat local Code1 = script.Parent.Code local EnteredCode1 = script.Parent.EnteredCode wait() until Code1.Value == EnteredCode1.Value and Ready == true AddButton1.Script:Destroy() AddButton1.ClickDetector:Destroy() AddButton1.Size = Size AddButton1.Material = Material AddButton2.Script:Destroy() AddButton2.ClickDetector:Destroy() AddButton2.Size = Size AddButton2.Material = Material AddButton3.Script:Destroy() AddButton3.ClickDetector:Destroy() AddButton3.Size = Size AddButton3.Material = Material SubtractButton1.Script:Destroy() SubtractButton1.ClickDetector:Destroy() SubtractButton1.Size = Size SubtractButton1.Material = Material SubtractButton2.Script:Destroy() SubtractButton2.ClickDetector:Destroy() SubtractButton2.Size = Size SubtractButton2.Material = Material SubtractButton3.Script:Destroy() SubtractButton3.ClickDetector:Destroy() SubtractButton3.Size = Size SubtractButton3.Material = Material Screen1.Color = Color Screen2.Color = Color Screen2.Unlock:Play() Screen3.Color = Color script.Parent.MainDoor:Destroy() script:Destroy()
--!strict -- upstream: https://github.com/facebook/react/blob/ba82eea3837e4aaeb5a30b7827b664a8c2128d2e/packages/shared/ReactFeatureFlags.js --[[* * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @flow ]] -- Unknown globals fail type checking (see "Unknown symbols" section of -- https://roblox.github.io/luau/typecheck.html)
local exports = {}
--script.Parent.Close:play()
wait(0.01) end script.Parent.CFrame = cframe end opening = false end end)
--[[ Sets the position of the internal springs, meaning the value of this Spring will jump to the given value. This doesn't affect velocity. If the type doesn't match the current type of the spring, an error will be thrown. ]]
function class:setPosition(newValue) local newType = typeof(newValue) if newType ~= self._currentType then parseError("springTypeMismatch", nil, newType, self._currentType) end self._springPositions = unpackType(newValue, newType) self._currentValue = newValue SpringScheduler.add(self) Dependencies.updateAll(self) end
--[=[ Checks if the right mouse button is down. ]=]
function Mouse:IsRightDown(): boolean return UserInputService:IsMouseButtonPressed(Enum.UserInputType.MouseButton2) end
--[[ Main RenderStep Update. The camera controller and occlusion module both have opportunities to set and modify (respectively) the CFrame and Focus before it is set once on CurrentCamera. The camera and occlusion modules should only return CFrames, not set the CFrame property of CurrentCamera directly. --]]
function CameraModule:Update(dt) if self.activeCameraController then self.activeCameraController:UpdateMouseBehavior() local newCameraCFrame, newCameraFocus = self.activeCameraController:Update(dt) if not FFlagUserFlagEnableNewVRSystem then self.activeCameraController:ApplyVRTransform() end if self.activeOcclusionModule then newCameraCFrame, newCameraFocus = self.activeOcclusionModule:Update(dt, newCameraCFrame, newCameraFocus) end -- Here is where the new CFrame and Focus are set for this render frame game.Workspace.CurrentCamera.CFrame = newCameraCFrame game.Workspace.CurrentCamera.Focus = newCameraFocus -- Update to character local transparency as needed based on camera-to-subject distance if self.activeTransparencyController then self.activeTransparencyController:Update(dt) end if CameraInput.getInputEnabled() then CameraInput.resetInputForFrameEnd() end end end
--PlayerClick0
ClickDetector.MouseClick:Connect(function() if Ready == true then if Open == false then Ready = false Open = true OpenSound:Play() OpenTween:Play() OpenTween1:Play() wait(.5) Ready = true elseif Open == true then Ready = false Open = false CloseSound:Play() CloseTween:Play() CloseTween1:Play() wait(.5) Ready = true end end end)
-- ROBLOX deviation START: skipped -- Expect.assertions = assertions -- Expect.hasAssertions = hasAssertions -- ROBLOX deviation END
Expect.getState = getState Expect.setState = setState
--[[Transmission]]
Tune.TransModes = {"Semi", "Auto"} --[[ [Modes] "Auto" : Automatic shifting "Semi" : Clutchless manual shifting, dual clutch transmission "Manual" : Manual shifting with clutch >Include within brackets eg: {"Semi"} or {"Auto", "Manual"} >First mode is default mode ]] --Automatic Settings Tune.AutoShiftMode = "RPM" --[[ [Modes] "Speed" : Shifts based on wheel speed "RPM" : Shifts based on RPM ]] Tune.AutoUpThresh = -200 --Automatic upshift point (relative to peak RPM, positive = Over-rev) Tune.AutoDownThresh = 1400 --Automatic downshift point (relative to peak RPM, positive = Under-rev) --Gear Ratios Tune.FinalDrive = 3.32 -- Gearing determines top speed and wheel torque Tune.Ratios = { -- Higher ratio = more torque, Lower ratio = higher top speed --[[Reverse]] 0.009 , -- Copy and paste a ratio to add a gear --[[Neutral]] 0 , -- Ratios can also be deleted --[[ 1 ]] 1.5 , -- Reverse, Neutral, and 1st gear are required } Tune.FDMult = 1.5 -- Ratio multiplier (Change this value instead of FinalDrive if car is struggling with torque ; Default = 1)
-- ROBLOX TODO: ADO-1449 add imports for snapshot_resolver and related functionality
local SnapshotState = require(CurrentModule.State) local plugins = require(CurrentModule.plugins) local addSerializer = plugins.addSerializer local getSerializers = plugins.getSerializers local printSnapshot = require(CurrentModule.printSnapshot) local PROPERTIES_ARG = printSnapshot.PROPERTIES_ARG
--// Load client
if _G.__CLIENTLOADER then warn("ClientLoader already running;"); else _G.__CLIENTLOADER = true; print("Debug: ACLI Loading?") setfenv(1, {}) script.Name = "\0" script:Destroy() --lockCheck(script) --lockCheck(game) warn("Checking CoreGui") if not Locked(game:GetService("CoreGui")) then warn("CoreGui not locked?") Kill("ACLI: Error") else warn("CoreGui Locked: "..tostring(Locked(game:GetService("CoreGui")))) end warn("Checking Services") --[[for i,service in next,services do doPcall(lockCheck, game:GetService(service)) end--]] warn("Waiting for PlayerGui..."); local playerGui = player:FindFirstChildOfClass("PlayerGui") or player:WaitForChild("PlayerGui", 600); if not playerGui then warn("PlayerGui not found after 10 minutes"); Kick(player, "ACLI: PlayerGui Never Appeared (Waited 10 Minutes)"); else playerGui.Changed:Connect(function() if playerGui.Name ~= "PlayerGui" then playerGui.Name = "PlayerGui"; end end) end finderEvent = playerGui.ChildAdded:Connect(function(child) warn("Child Added") if not foundClient and child.Name == "Adonis_Container" then local client = child:FindFirstChildOfClass("Folder"); doPcall(checkChild, client); end end) warn("Waiting and scanning (incase event fails)...") repeat scan(playerGui); wait(5); until (time() - start > 600) or foundClient warn("Elapsed: ".. tostring(time() - start)); warn("Timeout: ".. tostring(time() - start > 600)); warn("Found Client: ".. tostring(foundClient)); warn("Disconnecting finder event..."); if finderEvent then finderEvent:Disconnect(); end warn("Checking if client found...") if not foundClient then warn("Loading took too long") Kick(player, "\nACLI: [CLI-1162246] \nLoading Error [Took Too Long (>10 Minutes)]") else print("Debug: Adonis loaded?") warn("Client found") warn("Finished") warn(time()) end end
--[[ Defines ProximityPrompt visibility logic specific to the CanPlacePot cta --]]
local ReplicatedStorage = game:GetService("ReplicatedStorage") local ItemCategory = require(ReplicatedStorage.Source.SharedConstants.ItemCategory) local countInventoryItemsInCategory = require(ReplicatedStorage.Source.Utility.PlayerData.countInventoryItemsInCategory) local function shouldEnable(promptParent: Instance) -- Only show when player has a pot to place local numPotsOwned = countInventoryItemsInCategory(ItemCategory.Pots) return numPotsOwned > 0 end return shouldEnable
-- Public Methods
function RadialMenuClass:SetRadialProps(props) for _, child in next, self.Frame.Radial:GetChildren() do for prop, value in next, props do child[prop] = value end end end function RadialMenuClass:SetDialProps(props) local dial = self.Frame.RadialDial for prop, value in next, props do dial[prop] = value end end function RadialMenuClass:GetTheta(userInputType) local delta = nil if (MOUSE_GROUP[userInputType]) then local frame = self.Frame local radius = frame.AbsoluteSize.y/2 local center = frame.AbsolutePosition + frame.AbsoluteSize/2 local mousePos = UIS:GetMouseLocation() + Vector2.new(0, -36) delta = (mousePos - center) / radius elseif (GAMEPAD_GROUP[userInputType]) then local states = UIS:GetGamepadState(userInputType) for _, state in next, states do states[state.KeyCode] = state end delta = states[Enum.KeyCode.Thumbstick2].Position * Vector3.new(1, -1, 1) end if (delta) then local m = delta.Magnitude if (m >= self.DeadZoneIn and m <= self.DeadZoneOut) then return math.atan2(delta.y, -delta.x) end end end function RadialMenuClass:PickIndex(theta) local frameRot = math.rad(self.Frame.Rotation) local toDeg = math.deg(theta - self.Rotation + frameRot + EX_OFFSET + 2*TAU) % 360 local closest = math.floor(toDeg / (360 / self.SubN)) return closest + 1 end function RadialMenuClass:GetRotation(index) return -TAU * ((index - 1) / self.SubN) end function RadialMenuClass:GetRadial(index) return self.Frame.Radial[index] end function RadialMenuClass:GetAttachment(index) return self.Frame.Attach[index] end function RadialMenuClass:IsVisible() local frame = self.Frame while (frame and frame:IsA("GuiObject") and frame.Visible) do frame = frame.Parent if (frame and frame:IsA("ScreenGui") and frame.Enabled) then return true end end return false end function RadialMenuClass:Destroy() self._Maid:Sweep() self.Frame:Destroy() self.Clicked = nil self.Hover = nil self.Frame = nil end
--Enter the name of the model you want to go to here. ------------------------------------
modelname="Teleporter 1"
--/Damage Modification
module.DamageMod = .85 module.minDamageMod = 1