Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --first script
- script.Parent.Equipped:Connect(function(Mouse)
- Mouse.Button1Down:Connect(function()
- local animation = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(script.Parent.Animation)
- animation:Play()
- script.Disabled = true
- wait(1.5)
- script.Disabled = false
- end)
- end)
- --second script
- Mouse_Icon = "rbxasset://textures/GunCursor.png"
- Reloading_Icon = "rbxasset://textures/GunWaitCursor.png"
- Tool = script.Parent
- Mouse = nil
- function UpdateIcon()
- if Mouse then
- Mouse.Icon = Tool.Enabled and Mouse_Icon or Reloading_Icon
- end
- end
- function OnEquipped(ToolMouse)
- Mouse = ToolMouse
- UpdateIcon()
- end
- function OnChanged(Property)
- if Property == "Enabled" then
- UpdateIcon()
- end
- end
- Tool.Equipped:Connect(OnEquipped)
- Tool.Changed:Connect(OnChanged)
- --Third script
- script.Parent.Touched:Connect(function(hit)
- if hit.Parent:FindFirstChild("Humanoid") then
- hit.Parent.Humanoid:TakeDamage(10)
- wait(0.1)
- script.Disabled = true
- wait(1)
- script.Disabled = false
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement