Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Lighting = game:GetService("Lighting")
- local UIS = game:GetService("UserInputService")
- local TS = game:GetService("TweenService")
- local RS = game:GetService("ReplicatedStorage")
- local Player = game.Players.LocalPlayer
- UIS.InputBegan:Connect(function(Input,IsTyping)
- if IsTyping then return end
- if Input.KeyCode == Enum.KeyCode.E then
- game.ReplicatedStorage.Events.Pressure:FireServer()
- end
- end)
- RS.Events.Pressure.OnClientEvent:Connect(function(Duration, OtherPlayer)
- local Humanoid = Player.Character:WaitForChild("Humanoid")
- local ScaleAmount = 4
- local v1 = {
- OtherPlayer.Character.Humanoid:WaitForChild("HeadScale");
- OtherPlayer.Character.Humanoid:WaitForChild("BodyDepthScale");
- OtherPlayer.Character.Humanoid:WaitForChild("BodyWidthScale");
- OtherPlayer.Character.Humanoid:WaitForChild("BodyHeightScale")
- }
- game.Lighting.Brightness = 0
- local Effect = {
- game.ReplicatedStorage.Effects["Grey Null Sky"]:Clone();
- game.ReplicatedStorage.Effects.SpiritBlur:Clone();
- }
- for _, Eff in ipairs(Effect) do
- Eff.Parent = game.Lighting
- end
- for i,v in pairs(v1) do
- local QuickTween = TS:Create(v,TweenInfo.new(Duration), {Value = v.Value * ScaleAmount})
- QuickTween:Play()
- QuickTween.Completed:Connect(function()
- v.Value = 1
- end)
- end
- local StartTime = os.clock()
- while (StartTime - os.clock()) >= -Duration do
- local x = math.random(-100,100)/100
- local y = math.random(-100,100)/100
- local z = math.random(-100,100)/100
- Humanoid.CameraOffset = Vector3.new(x,y,z)
- wait()
- end
- Humanoid.CameraOffset = Vector3.new(0,0,0)
- for Index,Value in pairs(Effect) do
- Value:Destroy()
- Effect[Index] = nil
- end
- game.Lighting.Brightness = 1
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement