Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Players = game:GetService("Players")
- local Hill = script.Parent
- local Label = Hill.BillboardGui.TextLabel
- local king_name = Hill.KingName
- local fall_distance = Hill.Size.Magnitude
- print("fall_distance:", fall_distance)
- local kingdown = true
- local position1 = Hill.Position
- local function onTouch(part)
- if (kingdown) then
- kingdown = false
- king_name.Value = part.Parent.Name
- Label.Text = "Да здравствует король "..king_name.Value.."!"
- local KING = part.Parent.Humanoid
- local player = Players:GetPlayerFromCharacter(part.Parent)
- local leaderstats = player.leaderstats
- local crowns = leaderstats and
- leaderstats:FindFirstChild("Crowns")
- local tool_to_destroy = player.Backpack:FindFirstChild("Tool")
- if tool_to_destroy then
- tool_to_destroy:Destroy()
- end
- tool_to_destroy = KING.Parent:FindFirstChild("Tool")
- if tool_to_destroy then
- tool_to_destroy:Destroy()
- end
- while true do
- wait(1)
- KING.BodyDepthScale.Value += 0.06
- KING.HeadScale.Value += 0.04
- KING.BodyWidthScale.Value += 0.04
- KING.BodyHeightScale.Value += 0.01
- KING.WalkSpeed *=0.99
- crowns.Value += 1
- local position2 = part.Position
- local distance = (position1 - position2).magnitude
- local position2 = part.Position
- local distance = (position1 - position2).magnitude
- if distance > fall_distance then
- king_name.Value = ""
- Label.Text = "Король пал!"
- KING.BodyDepthScale.Value = 1
- KING.HeadScale.Value = 1
- KING.BodyWidthScale.Value = 1
- KING.BodyHeightScale.Value = 1
- KING.WalkSpeed = 16
- kingdown = true
- local return_tool = game.ReplicatedStorage.Tool:Clone()
- return_tool.Parent = KING.Parent
- break
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement