Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local ReplicatedStorage = game:WaitForChild("ReplicatedStorage")
- local Remote = ReplicatedStorage:WaitForChild("IceRemote")
- Remote.OnServerEvent:Connect(function(player)
- local Character = player.Character
- local RootPart = Character:WaitForChild("HumanoidRootPart")
- local folder = workspace:FindFirstChild("DebrisFolder") or Instance.new("Folder",workspace)
- folder.Name = "DebrisFolder"
- local Position = Instance.new("BodyVelocity", RootPart)
- Position.MaxForce = Vector3.new(999999,999999,999999)
- Position.P = 300
- Position.Velocity = RootPart.CFrame.LookVector * .1
- game.Debris:AddItem(Position,2)
- local val = -4
- local sizez = 3
- local sizex = 10
- local sideval = .5
- local function Ice()
- print("Funtion Çalıştı")
- local extra = math.random(-11,11)/10
- local Shard = ReplicatedStorage:WaitForChild("IceShard"):Clone()
- local side = math.random(-sideval, sideval)
- local up = Shard.Size.Y/2
- local rotate = math.random(0,180)
- local MRo = math.random(99,100)
- if MRo == 99 then
- local SRo = math.random(8,10)/10
- URo = MRo + SRo
- else
- local SRo = math.random(1,3)/10
- URo = MRo + SRo
- end
- Shard.Size = Vector3.new(sizez,sizex,sizez)
- Shard.CFrame = RootPart.CFrame * CFrame.new(side,-up,val + extra)
- Shard.Parent = folder
- Shard.CFrame = Shard.CFrame * CFrame.fromEulerAnglesXYZ(URo, rotate, 0.4)
- val = val - 2
- sizez = sizez + 1
- sizex = sizex + 1
- sideval = sideval + .5
- game.Debris:AddItem(Shard,5)
- spawn(function()
- wait(.5)
- local TweenService = game:GetService("TweenService")
- local TweenInform = TweenInfo.new(
- .3,
- Enum.EasingStyle.Linear,
- Enum.EasingDirection.Out,
- 0,
- false,
- 0
- )
- local properties = {
- CFrame = Shard.CFrame * CFrame.new(0, up * 1.5, 0)
- }
- local Tween = TweenService:Create(Shard,TweenInform,properties)
- Tween:Play()
- end)
- for i = 1,50 do
- Ice()
- wait()
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment