local part = script.Parent
part.Touched:Connect(function(hit)
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player then
game.StarterGui:SetCore("SendNotification", {
Title = "Сообщение";
Text = "Вы наступили на плиту!";
})
end
end)local part = script.Parent
local target = workspace.TeleportTarget
part.Touched:Connect(function(hit)
local character = hit.Parent
if character:FindFirstChild("HumanoidRootPart") then
character.HumanoidRootPart.CFrame = target.CFrame
end
end)local door = script.Parent
local open = false
door.ClickDetector.MouseClick:Connect(function()
if not open then
door.Transparency = 0.5
door.CanCollide = false
open = true
else
door.Transparency = 0
door.CanCollide = true
open = false
end
end)game.Players.PlayerAdded:Connect(function(player)
local stats = Instance.new("Folder")
stats.Name = "leaderstats"
stats.Parent = player
local coins = Instance.new("IntValue")
coins.Name = "Coins"
coins.Parent = stats
end)local coin = script.Parent
coin.Touched:Connect(function(hit)
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player then
player.leaderstats.Coins.Value += 1
coin:Destroy()
end
end)local part = script.Parent
part.Touched:Connect(function(hit)
local human = hit.Parent:FindFirstChild("Humanoid")
if human then
human.JumpPower = 200
human:ChangeState(Enum.HumanoidStateType.Jumping)
task.wait(0.2)
human.JumpPower = 50
end
end)local part = script.Parent
part.Touched:Connect(function(hit)
local human = hit.Parent:FindFirstChild("Humanoid")
if human then
human:TakeDamage(20)
end
end)local part = script.Parent
while true do
part.CFrame = part.CFrame * CFrame.Angles(0, math.rad(1), 0)
task.wait()
end