Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tweenService = game:GetService("TweenService")
- local part = Instance.new("Part", game.Workspace)
- part.Anchored = true
- part.CanCollide = false
- part.Locked = true
- local brick = part
- function killbrick()
- local h = game.Workspace:findFirstChild("Humanoid")
- if h then h.Health = 0
- end
- local boom = Instance.new("Explosion")
- boom.Parent = brick
- local sound = brick.Sound
- sound:Play()
- end
- brick.Touched:connect(killbrick)
- local tweeningInformation = TweenInfo.new(
- 120, -- Length
- Enum.EasingStyle.Linear, -- Easing style of the TweenInfo
- Enum.EasingDirection.Out, -- Easing direction of the TweenInfo
- 0, -- Number of times the tween will repeat
- false, -- Should the tween repeat?
- 30 -- Delay between each tween
- )
- local partProperties = {
- Size = Vector3.new(999999,999999,9999999);
- Color = Color3.new(255, 0, 0);
- Transparency = 0
- }
- local Tween = tweenService:Create(part,tweeningInformation,partProperties)
- Tween:Play()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement