Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --SynapseX Decompiler
- local ReplicatedStorage = game:GetService("ReplicatedStorage")
- local UserInputService = game:GetService("UserInputService")
- local Player = game.Players.LocalPlayer
- local Backpack = Player.Backpack
- local Character = Player.Character
- if not Character or not Character.Parent then
- Character = Player.CharacterAdded:wait()
- end
- local Humanoid = Character:WaitForChild("Humanoid")
- local SharedMechanics = require(Backpack:WaitForChild("SharedMechanics"))
- local Communication = ReplicatedStorage:WaitForChild("Communication")
- local Tool = script.Parent
- local Equipped = false
- local Debounce = false
- local AllowReact = false
- local ToolEvent = Backpack.ToolEvent:WaitForChild("Tool")
- local RightLeg = Character:WaitForChild("Right Leg")
- local Torso = Character:WaitForChild("Torso")
- WeldCFrame = CFrame.new(0.5, -1.5, 0.5) * CFrame.fromEulerAnglesXYZ(-math.pi / 4, 0, 0)
- WeldCFrame2 = CFrame.new(0.5, -1.5, -0.5) * CFrame.fromEulerAnglesXYZ(math.pi / 6, 0, 0)
- RightLeg.Touched:connect(function(hit)
- if hit.Locked == true or hit.Anchored == true then
- return
- end
- game:GetService("ReplicatedStorage").Events.NetworkOwnership:FireServer(hit)
- if AllowReact and hit.Locked == false and hit.Anchored == false and AllowReact then
- AllowReact = false
- SharedMechanics.ApplyForce(hit, RightLeg, 90, Vector3.new(1000000, 35, 1000000), 0.5)
- end
- end)
- RightLeg.TouchEnded:connect(function(hit)
- if hit.Locked == true or hit.Anchored == true then
- return
- end
- game:GetService("ReplicatedStorage").Events.OwnershipEnded:FireServer(hit)
- if AllowReact and hit.Locked == false and hit.Anchored == false and AllowReact then
- AllowReact = false
- SharedMechanics.ApplyForce(hit, RightLeg, 90, Vector3.new(1000000, 35, 1000000), 0.5)
- end
- end)
- local function ReactTouching()
- for i, v in pairs(RightLeg:GetTouchingParts()) do
- if AllowReact and v.Locked == false and v.Anchored == false and AllowReact then
- AllowReact = false
- SharedMechanics.ApplyForce(v, RightLeg, 90, Vector3.new(1000000, 35, 1000000), 0.5)
- end
- end
- end
- Tool.Equipped:connect(function()
- Equipped = true
- end)
- Tool.Unequipped:connect(function()
- Equipped = false
- end)
- UserInputService.InputBegan:Connect(function(Key, Process)
- if Equipped and Key.UserInputType == Enum.UserInputType.MouseButton1 and not Process and Debounce == false then
- Debounce = true
- CreateAndUpdateWeld(Player.Name, "Click", Player.Character["Right Leg"], Player.Character.Torso, Player.Character["Right Leg"], WeldCFrame)
- wait(0.68)
- UpdateIndividualWeld(Player.Name, "Click", Player.Character["Right Leg"], WeldCFrame2)
- ToolEvent:Fire("Kick")
- AllowReact = true
- ReactTouching()
- if AllowReact and Backpack.PlayerLag.Value ~= nil and AllowReact then
- AllowReact = false
- SharedMechanics.ApplyForce(Backpack.PlayerLag.Value, RightLeg, 90, Vector3.new(1000000, 35, 1000000), 0.5)
- end
- wait(0.68)
- AllowReact = false
- RemoveWeld(Player.Name, "Click", Player.Character["Right Leg"])
- SharedMechanics.ResetWelds("Kick")
- Debounce = false
- end
- end)
- function CreateAndUpdateWeld(PlayerName, WeldName, WeldParent, WeldPart0, WeldPart1, CFrameValue)
- ReplicatedStorage.Events.CreateUpdate:FireServer(PlayerName, WeldName, WeldParent, WeldPart0, WeldPart1, CFrameValue)
- W = Instance.new("Weld")
- W.Name = WeldName
- W.Parent = WeldParent
- W.Part0 = WeldPart0
- W.Part1 = WeldPart1
- W.C0 = CFrameValue
- end
- function RemoveWeld(PlayerName, WeldName, WeldParent)
- ReplicatedStorage.Events.WeldRemoval:FireServer(PlayerName, WeldName, WeldParent)
- WeldParent:FindFirstChild(WeldName):Destroy()
- end
- function UpdateIndividualWeld(PlayerName, WeldName, WeldParent, CFrameValue)
- ReplicatedStorage.Events.UpdateWeld:FireServer(PlayerName, WeldName, WeldParent, CFrameValue)
- WeldParent:FindFirstChild(WeldName).C0 = CFrameValue
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement