Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Local Script
- --//Coded By XXBestShad0w
- local Pills = script.Parent
- local Handle = Pills:WaitForChild("Handle")
- local Player = game.Players.LocalPlayer
- local Character = workspace:WaitForChild(Player.Name)
- local Humanoid = Character:WaitForChild("Humanoid")
- local Mouse = Player:GetMouse()
- local CanUse = true
- local Equipped = false
- local PillsAnim = script:WaitForChild("PillsAnim")
- local function LoadAnimation(Who,track)
- x = Who:LoadAnimation(track)
- end
- local function PlayAnimation(track)
- track:play()
- end
- local Mouse_Icon = "rbxasset://textures/GunCursor.png"
- local Reloading_Icon = "rbxasset://textures\\GunWaitCursor.png"
- Pills.Equipped:connect(function()
- Equipped = true
- Mouse.Icon = Mouse_Icon
- Mouse.Button1Down:connect(function()
- if Humanoid and Humanoid.Health < Humanoid.MaxHealth and Equipped and CanUse then
- CanUse = false
- if Humanoid then
- LoadAnimation(Humanoid,PillsAnim)
- wait(.1)
- PlayAnimation(x)
- end
- local Clone = script:WaitForChild("Pills_Server"):Clone()
- Clone.Parent = Character
- Clone.Disabled = false
- wait(1)
- CanUse = true
- Pills:Destroy()
- end
- end)
- end)
- Pills.Unequipped:connect(function()
- Mouse.Icon = ""
- Equipped = false
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement