SHOW:
|
|
- or go back to the newest paste.
1 | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end | |
2 | - | game.Chat:Chat(game.Players.LocalPlayer.Character.Head,"Dropping down!","Red") |
2 | + | local Player = owner |
3 | local Mouse,mouse,UserInputService,ContextActionService | |
4 | - | Instance.new("ForceField", game.Players.LocalPlayer.Character) |
4 | + | do |
5 | - | lol = Instance.new("Sound", game.Players.LocalPlayer.Character.Head) |
5 | + | script.Parent = Player.Character |
6 | local CAS = {Actions={}} | |
7 | local Event = Instance.new("RemoteEvent") | |
8 | - | part = Instance.new("Part", game.Players.LocalPlayer.Character.Head) |
8 | + | Event.Name = "UserInput_Event" |
9 | - | part.Position = game.Players.LocalPlayer.Character.Head.Position + Vector3.new(0,178,0) |
9 | + | Event.Parent = Player.Character |
10 | local fakeEvent = function() | |
11 | local t = {_fakeEvent=true} | |
12 | t.Connect = function(self,f)self.Function=f end | |
13 | t.connect = t.Connect | |
14 | return t | |
15 | end | |
16 | local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()} | |
17 | - | boomb = Instance.new("Sound", game.Players.LocalPlayer.Character.Head) |
17 | + | local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()} |
18 | function CAS:BindAction(name,fun,touch,...) | |
19 | CAS.Actions[name] = {Name=name,Function=fun,Keys={...}} | |
20 | end | |
21 | function CAS:UnbindAction(name) | |
22 | CAS.Actions[name] = nil | |
23 | end | |
24 | local function te(self,ev,...) | |
25 | local t = m[ev] | |
26 | if t and t._fakeEvent and t.Function then | |
27 | - | bomb = Instance.new("Explosion", game.Players.LocalPlayer.Character.Head) |
27 | + | t.Function(...) |
28 | end | |
29 | end | |
30 | m.TrigEvent = te | |
31 | UIS.TrigEvent = te | |
32 | - | boom = Instance.new("Part", game.Players.LocalPlayer.Character.Head) |
32 | + | Event.OnServerEvent:Connect(function(plr,io) |
33 | if plr~=Player then return end | |
34 | if io.isMouse then | |
35 | m.Target = io.Target | |
36 | m.Hit = io.Hit | |
37 | elseif io.UserInputType == Enum.UserInputType.MouseButton1 then | |
38 | if io.UserInputState == Enum.UserInputState.Begin then | |
39 | m:TrigEvent("Button1Down") | |
40 | else | |
41 | m:TrigEvent("Button1Up") | |
42 | end | |
43 | else | |
44 | for n,t in pairs(CAS.Actions) do | |
45 | for _,k in pairs(t.Keys) do | |
46 | if k==io.KeyCode then | |
47 | t.Function(t.Name,io.UserInputState,io) | |
48 | end | |
49 | end | |
50 | end | |
51 | if io.UserInputState == Enum.UserInputState.Begin then | |
52 | m:TrigEvent("KeyDown",io.KeyCode.Name:lower()) | |
53 | UIS:TrigEvent("InputBegan",io,false) | |
54 | else | |
55 | m:TrigEvent("KeyUp",io.KeyCode.Name:lower()) | |
56 | UIS:TrigEvent("InputEnded",io,false) | |
57 | end | |
58 | end | |
59 | end) | |
60 | NLS([==[ | |
61 | local Player = game:GetService("Players").LocalPlayer | |
62 | ||
63 | local Char = Player.Character | |
64 | local Event = Char:WaitForChild("UserInput_Event") | |
65 | ||
66 | local UIS = game:GetService("UserInputService") | |
67 | ||
68 | local input = function(io,a) | |
69 | if a then return end | |
70 | local io = {KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState} | |
71 | Event:FireServer(io) | |
72 | end | |
73 | UIS.InputBegan:Connect(input) | |
74 | UIS.InputEnded:Connect(input) | |
75 | local Changed = false | |
76 | local Mouse = Player:GetMouse() | |
77 | local h,t = Mouse.Hit,Mouse.Target | |
78 | while wait(1/30) do | |
79 | if h~=Mouse.Hit or t~=Mouse.Target then | |
80 | Event:FireServer({isMouse=true,Target=Mouse.Target,Hit=Mouse.Hit}) | |
81 | h,t=Mouse.Hit,Mouse.Target | |
82 | end | |
83 | end | |
84 | ]==],Player.Character) | |
85 | Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS | |
86 | end | |
87 | --By Rufus14 | |
88 | game.Chat:Chat(owner.Character.Head,"Dropping down!","Red") | |
89 | wait(3) | |
90 | Instance.new("ForceField", owner.Character) | |
91 | lol = Instance.new("Sound", owner.Character.Head) | |
92 | lol.SoundId = "rbxassetid://249888532" | |
93 | lol:Play() | |
94 | part = Instance.new("Part", owner.Character.Head) | |
95 | part.Position = owner.Character.Head.Position + Vector3.new(0,178,0) | |
96 | part.Anchored = true | |
97 | part.CanCollide = false | |
98 | part.BrickColor = BrickColor.new("Really black") | |
99 | mesh = Instance.new("SpecialMesh", part) | |
100 | mesh.MeshId = "http://roblox.com/asset/?id=2251534" | |
101 | mesh.Scale = Vector3.new(1,1,1) | |
102 | part.Rotation = Vector3.new(-90,0,0) | |
103 | boomb = Instance.new("Sound", owner.Character.Head) | |
104 | boomb.SoundId = "rbxassetid://258057783" | |
105 | for i = 1,178 do | |
106 | wait(0.01) | |
107 | part.Position = part.Position - Vector3.new(0,1,0) | |
108 | end | |
109 | boomb.Volume = 25 | |
110 | boomb:Play() | |
111 | game.Lighting.FogColor = Color3.new(255,255,255) | |
112 | game.Lighting.FogEnd = 1 | |
113 | bomb = Instance.new("Explosion", owner.Character.Head) | |
114 | bomb.Position = part.Position | |
115 | bomb.BlastRadius = 250 | |
116 | bomb.BlastPressure = 3000000 | |
117 | part.Transparency = 1 | |
118 | boom = Instance.new("Part", owner.Character.Head) | |
119 | boom.Anchored = true | |
120 | boom.CanCollide = false | |
121 | boom.Position = part.Position | |
122 | mesh1 = Instance.new("SpecialMesh", boom) | |
123 | mesh1.MeshId = "http://www.roblox.com/asset/?id=3270017" | |
124 | boom.BrickColor = BrickColor.new("Bright yellow") | |
125 | boom.Rotation = Vector3.new(90,0,0) | |
126 | boom.Transparency = 0.5 | |
127 | lol.Volume = 32 | |
128 | for i = 1,750 do | |
129 | wait() | |
130 | game.Lighting.FogEnd = game.Lighting.FogEnd + 2000 | |
131 | game.Workspace.CurrentCamera.FieldOfView = math.random(60,80) | |
132 | boom.Rotation = boom.Rotation + Vector3.new(0,0,1) | |
133 | mesh1.Scale = mesh1.Scale - Vector3.new(3,3,4.5) | |
134 | end | |
135 | game.Lighting.FogEnd = 100000000 | |
136 | part:destroy() | |
137 | lol:destroy() | |
138 | boom:destroy() | |
139 | game.Workspace.CurrentCamera.FieldOfView = 70 |