Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --//Server Main\\--
- --// GENERAL \\--
- local Tool = script.Parent
- local ReplicatedStoragePackage = game.ReplicatedStorage:WaitForChild("HiddenBladeStuff")
- --// REMOTES \\--
- local RemoteFolder = ReplicatedStoragePackage:WaitForChild("Remotes")
- local Damager = RemoteFolder:WaitForChild("Damager")
- local Giver = RemoteFolder:WaitForChild("Giver")
- local Remover = RemoteFolder:WaitForChild("Remover")
- local Starter = RemoteFolder:WaitForChild("Starter")
- --// ANIMATIONS \\--
- local AnimationsFolder = ReplicatedStoragePackage:WaitForChild("Animations")
- local Idle = AnimationsFolder:WaitForChild("Idle")
- local Sheath = AnimationsFolder:WaitForChild("Sheath")
- local Attack = AnimationsFolder:WaitForChild("Attack")
- --// VALUES \\--
- local ValuesFolder = ReplicatedStoragePackage:WaitForChild("Values")
- local hasEquipped = ValuesFolder:WaitForChild("hasEquipped")
- local killCount = ValuesFolder:WaitForChild("killCount")
- local isVictimHumanoid = ValuesFolder:WaitForChild("isVictimHumanoid")
- --// SETTINGS \\--
- local ConfigFile = Tool:WaitForChild("Settings")
- local Damage = ConfigFile:WaitForChild("Damage")
- local Distance = ConfigFile:WaitForChild("Distance")
- --// MODELS \\--
- local ModelsFolder = ReplicatedStoragePackage:WaitForChild("Models")
- local HiddenBlade = ModelsFolder:WaitForChild("HiddenBlade")
- --[[ // REMOTE LISTEN \\ ]]--
- Starter.OnServerEvent:Connect(function(Client, Humanoid, RightLowerArm)
- --// ANIMATION TRACKS \\--
- local IdleTrack = Humanoid:LoadAnimation(Idle)
- local SheathTrack = Humanoid:LoadAnimation(Sheath)
- local AttackTrack = Humanoid:LoadAnimation(Attack)
- --// LOCAL FUNCTIONS \\--
- local function ghb()
- local CloneHiddenBlade = HiddenBlade:Clone()
- CloneHiddenBlade.Parent = RightLowerArm
- local WeldHiddenBlade = Instance.new("Weld", RightLowerArm)
- WeldHiddenBlade.Name = "WeldHiddenBlade"
- WeldHiddenBlade.Part0 = CloneHiddenBlade.PrimaryPart
- WeldHiddenBlade.Part1 = RightLowerArm
- print("Added the Hidden Blade")
- end
- local function unghb()
- local CloneHiddenBlade = RightLowerArm:FindFirstChild("HiddenBlade")
- local WeldHiddenBlade = RightLowerArm:FindFirstChild("WeldHiddenBlade")
- CloneHiddenBlade:Destroy()
- WeldHiddenBlade:Destroy()
- print("Removed the Hidden Blade")
- end
- Damager.OnServerEvent:Connect(function(Client, VictimHumanoid, Damage)
- AttackTrack:Play()
- VictimHumanoid:TakeDamage(Damage.Value)
- print(VictimHumanoid.Parent.Name.." has died...")
- end)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement