top of page
Search

Open Source Stat Train

  • Writer: Asporus
    Asporus
  • Aug 8, 2020
  • 1 min read

This practically just trains a stat named "Stat1" which is a numerical value inside of the player. You click and it does the animation. (animationId is set to 0 so you can add your own animations. this script should be inside a tool inside starterpack, or wherever you want your tool to be.)




local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:wait()
local Humanoid = Character:WaitForChild("Humanoid")
local Tool = script.Parent

Tool.Equipped:Connect(function(Equip)
    local IdleAnim = Instance.new("Animation")
    IdleAnim.AnimationId = "0"
    local PlayAnim = Humanoid:LoadAnimation(IdleAnim)
    Tool.Activated:Connect(function(Activated)
        local ActionAnim = Instance.new("Animation")
        IdleAnim.AnimationId = "0"
        local ActionPlay = Humanoid:LoadAnimation(ActionAnim)
        local Stat1 = Player:WaitForChild("Stat1").Value
        
        wait(ActionAnim.Length)
        Stat1 = Stat1 + 0.1
    end
 end)



 
 
 

Recent Posts

See All
Open Source Run System

This is a running system using the service known as "UserInputService". UserInputService, (abbreviated as UIS), practically detects input...

 
 
 
Open Source Leaderstats Script

Leaderstats are very simple, and most developers that have developed for at least a week have learned them. Some new people, though,...

 
 
 

Comments


Post: Blog2_Post
  • Facebook
  • Twitter
  • LinkedIn

©2020 by Asporus. Open Source Script Library.

bottom of page