SHOW:
|
|
- or go back to the newest paste.
1 | - | --School Shooter script by DMS ok bye |
1 | + | ----[Created by OmegaHardcore99]---- |
2 | - | o1 = Instance.new("Model") |
2 | + | |
3 | - | o1.Name = "Vest" |
3 | + | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end |
4 | - | o2 = Instance.new("Part") |
4 | + | local Player,Mouse,mouse,UserInputService,ContextActionService = owner |
5 | - | o2.Name = "Middle" |
5 | + | do |
6 | - | o2.Parent = o1 |
6 | + | print("FE Compatibility code by Mokiros") |
7 | - | o2.BrickColor = BrickColor.new("Brick yellow") |
7 | + | script.Parent = Player.Character |
8 | - | o2.Transparency = 1 |
8 | + | |
9 | - | o2.Position = Vector3.new(0.139906004, 1.05800402, -11.1099901) |
9 | + | --RemoteEvent for communicating |
10 | - | o2.Anchored = true |
10 | + | local Event = Instance.new("RemoteEvent") |
11 | - | o2.CFrame = CFrame.new(0.139906004, 1.05800402, -11.1099901, 1, 0, 0, 0, 1, 0, 0, 0, 1) |
11 | + | Event.Name = "UserInput_Event" |
12 | - | o2.CanCollide = false |
12 | + | |
13 | - | o2.FormFactor = Enum.FormFactor.Symmetric |
13 | + | --Fake event to make stuff like Mouse.KeyDown work |
14 | - | o2.Size = Vector3.new(2, 2, 1) |
14 | + | local function fakeEvent() |
15 | - | o2.BackSurface = Enum.SurfaceType.SmoothNoOutlines |
15 | + | local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end} |
16 | - | o2.BottomSurface = Enum.SurfaceType.SmoothNoOutlines |
16 | + | t.connect = t.Connect |
17 | - | o2.FrontSurface = Enum.SurfaceType.SmoothNoOutlines |
17 | + | return t |
18 | - | o2.LeftSurface = Enum.SurfaceType.SmoothNoOutlines |
18 | + | end |
19 | - | o2.RightSurface = Enum.SurfaceType.SmoothNoOutlines |
19 | + | |
20 | - | o2.TopSurface = Enum.SurfaceType.SmoothNoOutlines |
20 | + | --Creating fake input objects with fake variables |
21 | - | o2.Color = Color3.new(0.843137, 0.772549, 0.603922) |
21 | + | local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()} |
22 | - | o3 = Instance.new("Part") |
22 | + | local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()} |
23 | - | o3.Name = "Pack" |
23 | + | local CAS = {Actions={},BindAction=function(self,name,fun,touch,...) |
24 | - | o3.Parent = o1 |
24 | + | CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil |
25 | - | o3.BrickColor = BrickColor.new("Dark stone grey") |
25 | + | end} |
26 | - | o3.Position = Vector3.new(0.139907002, 1.07000601, -10.3049936) |
26 | + | --Merged 2 functions into one by checking amount of arguments |
27 | - | o3.Rotation = Vector3.new(-180, 0, -180) |
27 | + | CAS.UnbindAction = CAS.BindAction |
28 | - | o3.Anchored = true |
28 | + | |
29 | - | o3.CFrame = CFrame.new(0.139907002, 1.07000601, -10.3049936, -1, 0, 0, 0, 1, 0, 0, 0, -1) |
29 | + | --This function will trigger the events that have been :Connect()'ed |
30 | - | o3.CanCollide = false |
30 | + | local function te(self,ev,...) |
31 | - | o3.FormFactor = Enum.FormFactor.Custom |
31 | + | local t = m[ev] |
32 | - | o3.Size = Vector3.new(1.65999985, 1.80000019, 0.630000472) |
32 | + | if t and t._fakeEvent and t.Function then |
33 | - | o3.BackSurface = Enum.SurfaceType.SmoothNoOutlines |
33 | + | t.Function(...) |
34 | - | o3.BottomSurface = Enum.SurfaceType.SmoothNoOutlines |
34 | + | |
35 | - | o3.FrontSurface = Enum.SurfaceType.SmoothNoOutlines |
35 | + | end |
36 | - | o3.LeftSurface = Enum.SurfaceType.SmoothNoOutlines |
36 | + | m.TrigEvent = te |
37 | - | o3.RightSurface = Enum.SurfaceType.SmoothNoOutlines |
37 | + | UIS.TrigEvent = te |
38 | - | o3.TopSurface = Enum.SurfaceType.SmoothNoOutlines |
38 | + | |
39 | - | o3.Color = Color3.new(0.388235, 0.372549, 0.384314) |
39 | + | Event.OnServerEvent:Connect(function(plr,io) |
40 | - | o4 = Instance.new("Part") |
40 | + | if plr~=Player then return end |
41 | - | o4.Name = "Strap" |
41 | + | if io.isMouse then |
42 | - | o4.Parent = o1 |
42 | + | m.Target = io.Target |
43 | - | o4.BrickColor = BrickColor.new("Black") |
43 | + | m.Hit = io.Hit |
44 | - | o4.Position = Vector3.new(0.66991502, 1.05500698, -11.1149797) |
44 | + | else |
45 | - | o4.Anchored = true |
45 | + | local b = io.UserInputState == Enum.UserInputState.Begin |
46 | - | o4.CFrame = CFrame.new(0.66991502, 1.05500698, -11.1149797, 1, 0, 0, 0, 1, 0, 0, 0, 1) |
46 | + | if io.UserInputType == Enum.UserInputType.MouseButton1 then |
47 | - | o4.CanCollide = false |
47 | + | return m:TrigEvent(b and "Button1Down" or "Button1Up") |
48 | - | o4.FormFactor = Enum.FormFactor.Custom |
48 | + | |
49 | - | o4.Size = Vector3.new(0.259999752, 2.11000037, 1.15000045) |
49 | + | for _,t in pairs(CAS.Actions) do |
50 | - | o4.BackSurface = Enum.SurfaceType.SmoothNoOutlines |
50 | + | for _,k in pairs(t.Keys) do |
51 | - | o4.BottomSurface = Enum.SurfaceType.SmoothNoOutlines |
51 | + | if k==io.KeyCode then |
52 | - | o4.FrontSurface = Enum.SurfaceType.SmoothNoOutlines |
52 | + | t.Function(t.Name,io.UserInputState,io) |
53 | - | o4.LeftSurface = Enum.SurfaceType.SmoothNoOutlines |
53 | + | end |
54 | - | o4.RightSurface = Enum.SurfaceType.SmoothNoOutlines |
54 | + | end |
55 | - | o4.TopSurface = Enum.SurfaceType.SmoothNoOutlines |
55 | + | |
56 | - | o4.Color = Color3.new(0.105882, 0.164706, 0.207843) |
56 | + | m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower()) |
57 | - | o5 = Instance.new("Part") |
57 | + | UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false) |
58 | - | o5.Name = "Flap" |
58 | + | end |
59 | - | o5.Parent = o1 |
59 | + | end) |
60 | - | o5.BrickColor = BrickColor.new("Black") |
60 | + | Event.Parent = NLS([==[ |
61 | - | o5.Position = Vector3.new(0.139905006, 1.85000098, -10.2900219) |
61 | + | local Player = game:GetService("Players").LocalPlayer |
62 | - | o5.Anchored = true |
62 | + | local Event = script:WaitForChild("UserInput_Event") |
63 | - | o5.CFrame = CFrame.new(0.139905006, 1.85000098, -10.2900219, 1, 0, 0, 0, 1, 0, 0, 0, 1) |
63 | + | |
64 | - | o5.CanCollide = false |
64 | + | local UIS = game:GetService("UserInputService") |
65 | - | o5.FormFactor = Enum.FormFactor.Custom |
65 | + | local input = function(io,a) |
66 | - | o5.Size = Vector3.new(1.71999979, 0.400000006, 0.639999866) |
66 | + | if a then return end |
67 | - | o5.BackSurface = Enum.SurfaceType.SmoothNoOutlines |
67 | + | --Since InputObject is a client-side instance, we create and pass table instead |
68 | - | o5.BottomSurface = Enum.SurfaceType.SmoothNoOutlines |
68 | + | Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState}) |
69 | - | o5.FrontSurface = Enum.SurfaceType.SmoothNoOutlines |
69 | + | end |
70 | - | o5.LeftSurface = Enum.SurfaceType.SmoothNoOutlines |
70 | + | UIS.InputBegan:Connect(input) |
71 | - | o5.RightSurface = Enum.SurfaceType.SmoothNoOutlines |
71 | + | UIS.InputEnded:Connect(input) |
72 | - | o5.TopSurface = Enum.SurfaceType.SmoothNoOutlines |
72 | + | |
73 | - | o5.Color = Color3.new(0.105882, 0.164706, 0.207843) |
73 | + | local Mouse = Player:GetMouse() |
74 | - | o6 = Instance.new("Part") |
74 | + | local h,t |
75 | - | o6.Name = "Pocket" |
75 | + | --Give the server mouse data 30 times every second, but only if the values changed |
76 | - | o6.Parent = o1 |
76 | + | --If player is not moving their mouse, client won't fire events |
77 | - | o6.BrickColor = BrickColor.new("Black") |
77 | + | while wait(1/30) do |
78 | - | o6.Position = Vector3.new(0.149883002, 0.860005975, -10.0399857) |
78 | + | if h~=Mouse.Hit or t~=Mouse.Target then |
79 | - | o6.Rotation = Vector3.new(-0, 0, -90) |
79 | + | h,t=Mouse.Hit,Mouse.Target |
80 | - | o6.Anchored = true |
80 | + | Event:FireServer({isMouse=true,Target=t,Hit=h}) |
81 | - | o6.CFrame = CFrame.new(0.149883002, 0.860005975, -10.0399857, 0, 1, 0, -1, 0, 0, 0, 0, 1) |
81 | + | |
82 | - | o6.CanCollide = false |
82 | + | end]==],Player.Character) |
83 | - | o6.FormFactor = Enum.FormFactor.Custom |
83 | + | Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS |
84 | - | o6.Size = Vector3.new(0.600000024, 0.800000131, 0.200000003) |
84 | + | |
85 | - | o6.BackSurface = Enum.SurfaceType.SmoothNoOutlines |
85 | + | |
86 | - | o6.BottomSurface = Enum.SurfaceType.SmoothNoOutlines |
86 | + | Player = owner |
87 | - | o6.FrontSurface = Enum.SurfaceType.SmoothNoOutlines |
87 | + | |
88 | - | o6.LeftSurface = Enum.SurfaceType.SmoothNoOutlines |
88 | + | Bomb = Instance.new("Tool") |
89 | - | o6.RightSurface = Enum.SurfaceType.SmoothNoOutlines |
89 | + | Bomb.Parent = Player.Backpack |
90 | - | o6.TopSurface = Enum.SurfaceType.SmoothNoOutlines |
90 | + | Bomb.Name = "WTF Bomb" |
91 | - | o6.Color = Color3.new(0.105882, 0.164706, 0.207843) |
91 | + | Bomb.ToolTip = "Nuke the Entire Game :3" |
92 | - | o7 = Instance.new("Part") |
92 | + | |
93 | - | o7.Name = "Pocket" |
93 | + | H = Instance.new("Part") |
94 | - | o7.Parent = o1 |
94 | + | H.Parent = Bomb |
95 | - | o7.BrickColor = BrickColor.new("Black") |
95 | + | H.Name = "Handle" |
96 | - | o7.Position = Vector3.new(0.139600992, 1.10000801, -10.3099718) |
96 | + | H.Size = Vector3.new(2,1,2) |
97 | - | o7.Rotation = Vector3.new(-90, 90, 0) |
97 | + | |
98 | - | o7.Anchored = true |
98 | + | C4 = Instance.new("SpecialMesh") |
99 | - | o7.CFrame = CFrame.new(0.139600992, 1.10000801, -10.3099718, 0, 0, 1, -1, 0, 0, 0, -1, 0) |
99 | + | C4.Parent = H |
100 | - | o7.CanCollide = false |
100 | + | C4.MeshId = "http://www.roblox.com/asset/?id=104516854" |
101 | - | o7.FormFactor = Enum.FormFactor.Custom |
101 | + | C4.TextureId = "http://www.roblox.com/asset/?id=104516981" |
102 | - | o7.Size = Vector3.new(0.600000024, 0.400000155, 1.70000005) |
102 | + | C4.Scale = Vector3.new(2,2,2) |
103 | - | o7.BackSurface = Enum.SurfaceType.SmoothNoOutlines |
103 | + | |
104 | - | o7.BottomSurface = Enum.SurfaceType.SmoothNoOutlines |
104 | + | function nuke() |
105 | - | o7.FrontSurface = Enum.SurfaceType.SmoothNoOutlines |
105 | + | |
106 | - | o7.LeftSurface = Enum.SurfaceType.SmoothNoOutlines |
106 | + | skyNOOB = coroutine.create(function() |
107 | - | o7.RightSurface = Enum.SurfaceType.SmoothNoOutlines |
107 | + | while wait(0.3) do |
108 | - | o7.TopSurface = Enum.SurfaceType.SmoothNoOutlines |
108 | + | local s = Instance.new("Sky",game.Lighting) |
109 | - | o7.Color = Color3.new(0.105882, 0.164706, 0.207843) |
109 | + | -- s.SkyboxBk,s.SkyboxDn,s.SkyboxFt,s.SkyboxLf,s.SkyboxRt,s.SkyboxUp = "rbxassetid://227451813","rbxassetid://559660882","rbxassetid://947995509","rbxassetid://824851584","rbxassetid://835633217","rbxassetid://726895156" |
110 | - | o8 = Instance.new("Part") |
110 | + | s.SkyboxBk,s.SkyboxDn,s.SkyboxFt,s.SkyboxLf,s.SkyboxRt,s.SkyboxUp = "rbxassetid://2536280211,rbxassetid://2536280211,rbxassetid://2536280211,rbxassetid://2536280211,rbxassetid://2536280211,rbxassetid://2536280211" |
111 | - | o8.Name = "Strap" |
111 | + | s.CelestialBodiesShown = false |
112 | - | o8.Parent = o1 |
112 | + | end |
113 | - | o8.BrickColor = BrickColor.new("Black") |
113 | + | |
114 | - | o8.Position = Vector3.new(-0.37014699, 1.05500698, -11.1149921) |
114 | + | soundNOOB = coroutine.create(function() |
115 | - | o8.Anchored = true |
115 | + | local a = Instance.new("Sound",workspace) |
116 | - | o8.CFrame = CFrame.new(-0.37014699, 1.05500698, -11.1149921, 1, 0, 0, 0, 1, 0, 0, 0, 1) |
116 | + | a.SoundId = "rbxassetid://2538467220" |
117 | - | o8.CanCollide = false |
117 | + | a.Name = "RAINING MEN" |
118 | - | o8.FormFactor = Enum.FormFactor.Custom |
118 | + | a.Volume = 58359 |
119 | - | o8.Size = Vector3.new(0.259999752, 2.11000037, 1.15000045) |
119 | + | a.Looped = true |
120 | - | o8.BackSurface = Enum.SurfaceType.SmoothNoOutlines |
120 | + | a:Play() |
121 | - | o8.BottomSurface = Enum.SurfaceType.SmoothNoOutlines |
121 | + | while wait(0.2) do |
122 | - | o8.FrontSurface = Enum.SurfaceType.SmoothNoOutlines |
122 | + | local rainin = workspace:FindFirstChild("RAINING MEN") |
123 | - | o8.LeftSurface = Enum.SurfaceType.SmoothNoOutlines |
123 | + | if not rainin then |
124 | - | o8.RightSurface = Enum.SurfaceType.SmoothNoOutlines |
124 | + | a = Instance.new("Sound",workspace) |
125 | - | o8.TopSurface = Enum.SurfaceType.SmoothNoOutlines |
125 | + | a.SoundId = "rbxassetid://2538467220" |
126 | - | o8.Color = Color3.new(0.105882, 0.164706, 0.207843) |
126 | + | a.Name = "RAINING MEN" |
127 | - | o9 = Instance.new("Part") |
127 | + | a.Volume = 58359 |
128 | - | o9.Parent = o1 |
128 | + | a.Looped = true |
129 | - | o9.BrickColor = BrickColor.new("Really black") |
129 | + | a:Play() |
130 | - | o9.Reflectance = 0.10000000149012 |
130 | + | |
131 | - | o9.Position = Vector3.new(0.173590899, 4.00173569, -9.98207664) |
131 | + | end |
132 | - | o9.Rotation = Vector3.new(2.9181666e-009, -3.48279983e-008, -8.55249798e-019) |
132 | + | |
133 | - | o9.Anchored = true |
133 | + | rainNOOB = coroutine.create(function() |
134 | - | o9.CFrame = CFrame.new(0.173590899, 4.00173569, -9.98207664, 0.999998331, 1.49269007e-020, -6.07863204e-010, 1.49269007e-020, 1, -5.09317831e-011, -6.07863204e-010, -5.09317831e-011, 1.00000334) |
134 | + | local cc = Instance.New("ColorCorrectionEffect",game.Lighting) |
135 | - | o9.FormFactor = Enum.FormFactor.Plate |
135 | + | cc.Saturation = -4 |
136 | - | o9.Size = Vector3.new(2, 4.80000019, 2) |
136 | + | end) |
137 | - | o9.BackSurface = Enum.SurfaceType.SmoothNoOutlines |
137 | + | coroutine.resume(rainNOOB) |
138 | - | o9.BottomSurface = Enum.SurfaceType.SmoothNoOutlines |
138 | + | coroutine.resume(soundNOOB) |
139 | - | o9.FrontSurface = Enum.SurfaceType.SmoothNoOutlines |
139 | + | coroutine.resume(skyNOOB) |
140 | - | o9.LeftSurface = Enum.SurfaceType.SmoothNoOutlines |
140 | + | |
141 | - | o9.RightSurface = Enum.SurfaceType.SmoothNoOutlines |
141 | + | |
142 | - | o9.TopSurface = Enum.SurfaceType.SmoothNoOutlines |
142 | + | |
143 | - | o9.Color = Color3.new(0.0666667, 0.0666667, 0.0666667) |
143 | + | for i, player in ipairs(game.Players:GetPlayers()) do |
144 | - | o10 = Instance.new("SpecialMesh") |
144 | + | if player.Character then |
145 | - | o10.Parent = o9 |
145 | + | local tor = player.Character:FindFirstChild('Torso') |
146 | - | o10.Scale = Vector3.new(0.600000024, 1, 0.600000024) |
146 | + | if tor then |
147 | - | o10.MeshType = Enum.MeshType.Brick |
147 | + | S = Instance.new("Explosion",game.workspace) |
148 | - | o11 = Instance.new("Part") |
148 | + | S.Position = tor.Position |
149 | - | o11.Parent = o1 |
149 | + | |
150 | - | o11.BrickColor = BrickColor.new("Mid gray") |
150 | + | |
151 | - | o11.Reflectance = 0.20000000298023 |
151 | + | |
152 | - | o11.Position = Vector3.new(0.173592806, 4.10173273, -11.1821489) |
152 | + | |
153 | - | o11.Rotation = Vector3.new(-180, 89.8953247, -90) |
153 | + | Bomb.Activated:connect(nuke) |