SHOW:
|
|
- or go back to the newest paste.
1 | if game:GetService("RunService"):IsClient()then error("Please run as a server script. Use h/ instead of hl/.")end;print("FE Compatibility: by WaverlyCole");InternalData = {} | |
2 | do | |
3 | script.Parent = owner.Character | |
4 | local Event = Instance.new("RemoteEvent");Event.Name = "UserInput" | |
5 | local function NewFakeEvent() | |
6 | local Bind = Instance.new("BindableEvent") | |
7 | local Fake;Fake = {Connections = {}, | |
8 | fakeEvent=true; | |
9 | Connect=function(self,Func) | |
10 | Bind.Event:connect(Func) | |
11 | self.Connections[Bind] = true | |
12 | return setmetatable({Connected = true},{ | |
13 | __index = function (self,Index) | |
14 | if Index:lower() == "disconnect" then | |
15 | return function() Fake.Connections[Bind] = false;self.Connected = false end | |
16 | end | |
17 | return Fake[Index] | |
18 | end; | |
19 | __tostring = function() return "Connection" end; | |
20 | }) | |
21 | end} | |
22 | Fake.connect = Fake.Connect;return Fake; | |
23 | end | |
24 | local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()} | |
25 | local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()} | |
26 | local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...) | |
27 | self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil | |
28 | end};ContextActionService.UnBindAction = ContextActionService.BindAction | |
29 | local function TriggerEvent(self,Event,...) | |
30 | local Trigger = Mouse[Event] | |
31 | if Trigger and Trigger.fakeEvent and Trigger.Connections then | |
32 | for Connection,Active in pairs(Trigger.Connections) do if Active then Connection:Fire(...) end end | |
33 | end | |
34 | end | |
35 | Mouse.TrigEvent = TriggerEvent;UserInputService.TrigEvent = TriggerEvent | |
36 | Event.OnServerEvent:Connect(function(FiredBy,Input) | |
37 | if FiredBy.Name ~= owner.Name then return end | |
38 | if Input.MouseEvent then | |
39 | Mouse.Target = Input.Target;Mouse.Hit = Input.Hit | |
40 | else | |
41 | local Begin = Input.UserInputState == Enum.UserInputState.Begin | |
42 | if Input.UserInputType == Enum.UserInputType.MouseButton1 then return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up") end | |
43 | for _,Action in pairs(ContextActionService.Actions) do | |
44 | for _,Key in pairs(Action.Keys) do if Key==Input.KeyCode then Action.Function(Action.Name,Input.UserInputState,Input) end end | |
45 | end | |
46 | Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower()) | |
47 | UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false) | |
48 | end | |
49 | end) | |
50 | InternalData["Mouse"] = Mouse;InternalData["ContextActionService"] = ContextActionService;InternalData["UserInputService"] = UserInputService | |
51 | Event.Parent = NLS([[ | |
52 | local Player = owner;local Event = script:WaitForChild("UserInput");local UserInputService = game:GetService("UserInputService");local Mouse = Player:GetMouse() | |
53 | local Input = function(Input,gameProcessedEvent) | |
54 | if gameProcessedEvent then return end | |
55 | Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState}) | |
56 | end | |
57 | UserInputService.InputBegan:Connect(Input);UserInputService.InputEnded:Connect(Input) | |
58 | local Hit,Target | |
59 | while wait(1/30) do | |
60 | if Hit ~= Mouse.Hit or Target ~= Mouse.Target then | |
61 | Hit,Target = Mouse.Hit,Mouse.Target;Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit}) | |
62 | end | |
63 | end | |
64 | ]],owner.Character) | |
65 | end | |
66 | RealGame = game;game = setmetatable({},{ | |
67 | __index = function (self,Index) | |
68 | local Sandbox = function (Thing) | |
69 | if Thing:IsA("Player") then | |
70 | local RealPlayer = Thing | |
71 | return setmetatable({},{ | |
72 | __index = function (self,Index) | |
73 | local Type = type(RealPlayer[Index]) | |
74 | if Type == "function" then | |
75 | if Index:lower() == "getmouse" or Index:lower() == "mouse" then | |
76 | return function (self)return InternalData["Mouse"] end | |
77 | end | |
78 | return function (self,...)return RealPlayer[Index](RealPlayer,...) end | |
79 | end | |
80 | return RealPlayer[Index] | |
81 | end; | |
82 | __tostring = function(self) return RealPlayer.Name end | |
83 | }) | |
84 | end | |
85 | end | |
86 | if RealGame[Index] then | |
87 | local Type = type(RealGame[Index]) | |
88 | if Type == "function" then | |
89 | if Index:lower() == "getservice" or Index:lower() == "service" then | |
90 | return function (self,Service) | |
91 | local FakeServices = { | |
92 | ["players"] = function() | |
93 | return setmetatable({},{ | |
94 | __index = function (self2,Index2) | |
95 | local RealService = RealGame:GetService(Service) | |
96 | local Type2 = type(Index2) | |
97 | if Type2 == "function" then | |
98 | return function (self,...) return RealService[Index2](RealService,...)end | |
99 | else | |
100 | if Index2:lower() == "localplayer" then return Sandbox(owner) end | |
101 | return RealService[Index2] | |
102 | end | |
103 | end; | |
104 | __tostring = function(self) return RealGame:GetService(Service).Name end | |
105 | }) | |
106 | end; | |
107 | ["contextactionservice"] = function() return InternalData["ContextActionService"] end; | |
108 | ["userinputservice"] = function() return InternalData["UserInputService"] end; | |
109 | ["runservice"] = function() | |
110 | return setmetatable({},{ | |
111 | __index = function(self2,Index2) | |
112 | local RealService = RealGame:GetService(Service) | |
113 | local Type2 = type(Index2) | |
114 | if Type2 == "function" then | |
115 | return function (self,...) return RealService[Index2](RealService,...) end | |
116 | else | |
117 | local RunServices = { | |
118 | ["bindtorenderstep"] = function() return function (self,Name,Priority,Function) return RealGame:GetService("RunService").Stepped:Connect(Function) end end; | |
119 | ["renderstepped"] = function() return RealService["Stepped"] end | |
120 | } | |
121 | if RunServices[Index2:lower()] then return RunServices[Index2:lower()]() end | |
122 | return RealService[Index2] | |
123 | end | |
124 | end | |
125 | }) | |
126 | end | |
127 | } | |
128 | if FakeServices[Service:lower()] then return FakeServices[Service:lower()]() end | |
129 | return RealGame:GetService(Service) | |
130 | end | |
131 | end | |
132 | return function (self,...) return RealGame[Index](RealGame,...) end | |
133 | else | |
134 | if game:GetService(Index) then return game:GetService(Index) end | |
135 | return RealGame[Index] | |
136 | end | |
137 | end | |
138 | return nil | |
139 | end | |
140 | });Game = game;owner = game:GetService("Players").LocalPlayer;script = Instance.new("Script");print("Complete! Running...") | |
141 | -- woah | |
142 | ||
143 | -- Created by Nebula_Zorua | |
144 | -- Click to attack | |
145 | -- Uses skybox's sun | |
146 | ||
147 | wait() | |
148 | script.Parent = nil | |
149 | ||
150 | local me = game:service'Players'.localPlayer; | |
151 | local mouse = me:GetMouse() | |
152 | ||
153 | local I = Instance.new | |
154 | function IT(instance,parent,properties) | |
155 | local inst = I(instance) | |
156 | for i,v in next, properties do | |
157 | pcall(function() inst[v[1]] = v[2] end) | |
158 | end | |
159 | inst.Parent = parent | |
160 | return inst | |
161 | end | |
162 | ||
163 | function PARTANDMESH(parent,brickcolor,material,anchored,cancollide,locked,size,cframe,meshid,textureid,scale,partProps,meshProps) | |
164 | local part = IT("Part",parent or me.Character,{{"TopSurface",10},{"BottomSurface",10},{"BrickColor",brickcolor},{"Anchored",anchored},{"CanCollide",cancollide},{"Locked",locked},{"Material",material}, {"Size",size},{"CFrame",cframe}}) | |
165 | local mesh = IT("SpecialMesh",part,{{"MeshId",meshid},{"TextureId",textureid},{"Scale",scale}}) | |
166 | for i,v in next, partProps do | |
167 | pcall(function() part[i] = v end) | |
168 | end | |
169 | for i,v in next, meshProps do | |
170 | pcall(function() mesh[i] = v end) | |
171 | end | |
172 | return part,mesh | |
173 | end | |
174 | local RANDOM = math.random | |
175 | ||
176 | function PART(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR) | |
177 | local NEWPART = IT("Part",PARENT,{}) | |
178 | NEWPART.formFactor = FORMFACTOR | |
179 | NEWPART.Reflectance = REFLECTANCE | |
180 | NEWPART.Transparency = TRANSPARENCY | |
181 | NEWPART.CanCollide = false | |
182 | NEWPART.Locked = true | |
183 | NEWPART.Anchored = true | |
184 | if ANCHOR == false then | |
185 | NEWPART.Anchored = false | |
186 | end | |
187 | NEWPART.BrickColor = BrickColor.new(tostring(BRICKCOLOR)) | |
188 | NEWPART.Name = NAME | |
189 | NEWPART.Size = SIZE | |
190 | NEWPART.Position = me.Character.Torso.CFrame.p | |
191 | NEWPART.Material = MATERIAL | |
192 | NEWPART:BreakJoints() | |
193 | return NEWPART | |
194 | end | |
195 | ||
196 | function StatLabel(LABELTYPE, CFRAME, TEXT, COLOR) -- thanks shack BB | |
197 | local STATPART = PART(3, me.Character, "SmoothPlastic", 0, 1, "Really black", "Effect", Vector3.new()) | |
198 | STATPART.CFrame = CFrame.new(CFRAME.p + Vector3.new(0, 1.5, 0)) | |
199 | local BODYGYRO = IT("BodyGyro", STATPART,{}) | |
200 | local BODYPOSITION = IT("BodyPosition", STATPART,{}) | |
201 | BODYPOSITION.P = 2000 | |
202 | BODYPOSITION.D = 100 | |
203 | BODYPOSITION.maxForce = Vector3.new(math.huge, math.huge, math.huge) | |
204 | if LABELTYPE == "Normal" then | |
205 | BODYPOSITION.position = STATPART.Position + Vector3.new(RANDOM(-2, 2), 6, RANDOM(-2, 2)) | |
206 | elseif LABELTYPE == "Debuff" then | |
207 | BODYPOSITION.position = STATPART.Position + Vector3.new(RANDOM(-2, 2), 8, RANDOM(-2, 2)) | |
208 | elseif LABELTYPE == "Interruption" then | |
209 | BODYPOSITION.position = STATPART.Position + Vector3.new(RANDOM(-2,2), 8, RANDOM(-2, 2)) | |
210 | end | |
211 | game:GetService("Debris"):AddItem(STATPART ,5) | |
212 | local BILLBOARDGUI = Instance.new("BillboardGui", STATPART) | |
213 | BILLBOARDGUI.Adornee = STATPART | |
214 | BILLBOARDGUI.Size = UDim2.new(2.5, 0, 2.5 ,0) | |
215 | BILLBOARDGUI.StudsOffset = Vector3.new(-2, 2, 0) | |
216 | BILLBOARDGUI.AlwaysOnTop = false | |
217 | local TEXTLABEL = Instance.new("TextLabel", BILLBOARDGUI) | |
218 | TEXTLABEL.BackgroundTransparency = 1 | |
219 | TEXTLABEL.Size = UDim2.new(2.5, 0, 2.5, 0) | |
220 | TEXTLABEL.Text = TEXT | |
221 | TEXTLABEL.Font = "SciFi" | |
222 | TEXTLABEL.FontSize="Size42" | |
223 | TEXTLABEL.TextColor3 = COLOR | |
224 | TEXTLABEL.TextStrokeTransparency = 1 | |
225 | TEXTLABEL.TextScaled = true | |
226 | TEXTLABEL.TextWrapped = true | |
227 | coroutine.resume(coroutine.create(function(THEPART, THEBODYPOSITION, THETEXTLABEL) | |
228 | wait(0.2) | |
229 | for i=1, 5 do | |
230 | wait() | |
231 | THEBODYPOSITION.Position = THEPART.Position - Vector3.new(0, 0.5 ,0) | |
232 | end | |
233 | wait(1.2) | |
234 | for i=1, 5 do | |
235 | wait() | |
236 | THETEXTLABEL.TextTransparency = THETEXTLABEL.TextTransparency + 0.2 | |
237 | THETEXTLABEL.TextStrokeTransparency = THETEXTLABEL.TextStrokeTransparency + 0.2 | |
238 | THEBODYPOSITION.position = THEPART.Position + Vector3.new(0, 0.5, 0) | |
239 | end | |
240 | THEPART.Parent = nil | |
241 | end),STATPART, BODYPOSITION, TEXTLABEL) | |
242 | end | |
243 | ||
244 | function GETREGION(point,range,ignore) | |
245 | return workspace:FindPartsInRegion3WithIgnoreList(Region3.new(point-Vector3.new(1,1,1)*range/2,point+Vector3.new(1,1,1)*range/2),ignore,250) | |
246 | end | |
247 | ||
248 | ||
249 | function AoEDAMAGE(pos,rad,min,max,avoidbyjump,critRate,critMult,kill) | |
250 | local dmg = RANDOM(min,max) | |
251 | local R3 = GETREGION(pos,rad,{me.Character}) | |
252 | local Hit = {} | |
253 | for _,v in next, R3 do | |
254 | local h = (v and v.Parent and v.Parent:FindFirstChildOfClass'Humanoid' or nil) | |
255 | if(h and not Hit[h])then | |
256 | Hit[h] = true | |
257 | if(v.Parent:FindFirstChild'Head' and v.Parent.Head:IsA'BasePart' and v.Parent.Name ~= 'CKbackup' and v.Parent.Name ~= 'Nebula_Zorua' and v.Parent.Name ~= 'Salvo_Starly')then | |
258 | ||
259 | local hed = v.Parent.Head | |
260 | local crit = RANDOM(1,100) | |
261 | local dmgText = (crit <= critRate and "? - "..dmg*critMult or " - "..dmg) | |
262 | ||
263 | if(kill)then | |
264 | dmgText = "INSTANT" | |
265 | v.Parent:breakJoints() | |
266 | end | |
267 | if(not avoidbyjump or hed.CFrame.y <= pos.y+3)then | |
268 | if(crit <= critRate)then | |
269 | --dmg*critMult | |
270 | h.Health = h.Health - dmg*critMult | |
271 | else | |
272 | h.Health = h.Health - dmg | |
273 | end | |
274 | StatLabel('Normal',hed.CFrame * CFrame.new(0, 0 + hed.Size.z - 1, 0),dmgText,(dmgText:find"?" and BrickColor.new'Bright blue' or dmgText == "INSTANT" and BrickColor.new'Really red' or BrickColor.new'Navy blue').Color) | |
275 | - | StatLabel('Normal',hed.CFrame * CFrame.new(0, 0 + hed.Size.z - 1, 0),dmgText,(dmgText:find"?" and BrickColor.new'New Yeller' or dmgText == "INSTANT" and BrickColor.new'Really red' or BrickColor.new'Navy blue').Color) |
275 | + | |
276 | end | |
277 | end | |
278 | end | |
279 | end | |
280 | ||
281 | ||
282 | ||
283 | function SOUND(id,parent,pitch,volume,looped) | |
284 | local SOUND = I("Sound") | |
285 | SOUND.SoundId = id; | |
286 | SOUND.Parent = parent | |
287 | SOUND.Pitch = pitch or 1 | |
288 | SOUND.Looped = looped or false | |
289 | SOUND.Volume = volume or 1 | |
290 | return SOUND; | |
291 | end | |
292 | ||
293 | ||
294 | function FX(id,parent,pitch,volume) | |
295 | return coroutine.wrap(function() | |
296 | local FX = SOUND(id,parent,pitch,volume) | |
297 | FX:Play() | |
298 | repeat wait() until FX.IsLoaded | |
299 | game:service'Debris':AddItem(FX,FX.TimeLength+1) | |
300 | end)() | |
301 | ||
302 | end | |
303 | ||
304 | warn"Can we go on land?" | |
305 | warn"No." | |
306 | warn"Why?" | |
307 | warn"The sun is a sexy deadly lazer" | |
308 | - | warn"The sun is a deadly lazer" |
308 | + | |
309 | ||
310 | mouse.Button1Down:connect(function() | |
311 | FX("rbxassetid://811841430",workspace,1,10) | |
312 | local beam = I("Part",workspace) | |
313 | beam.TopSurface,beam.BottomSurface,beam.Size,beam.Anchored,beam.CanCollide,beam.Archivable = 10,10,Vector3.new(1,1,1),true,false,false | |
314 | beam.Material,beam.BrickColor = Enum.Material.Neon,BrickColor.new'Bright blue' | |
315 | - | beam.Material,beam.BrickColor = Enum.Material.Neon,BrickColor.new'New Yeller' |
315 | + | |
316 | local kthx = IT("Part",nil,{ | |
317 | {'Transparency',1},{'CanCollide',false},{'Anchored',true},{'Position',mouse.Hit.p} | |
318 | }) | |
319 | local mesh = I("BlockMesh",beam) | |
320 | mesh.Scale = Vector3.new(5,5,1e4) | |
321 | local explosion,explosionMesh = PARTANDMESH(workspace,BrickColor.new'Bright blue',"Neon",true,false,true,Vector3.new(1,1,1),mouse.Hit,"","",Vector3.new(5,5,5),{},{MeshType=Enum.MeshType.Sphere}) | |
322 | - | local explosion,explosionMesh = PARTANDMESH(workspace,BrickColor.new'New Yeller',"Neon",true,false,true,Vector3.new(1,1,1),mouse.Hit,"","",Vector3.new(5,5,5),{},{MeshType=Enum.MeshType.Sphere}) |
322 | + | |
323 | for trans = 0, 1, .05 do | |
324 | explosion.Transparency = trans | |
325 | explosionMesh.Scale = explosionMesh.Scale + Vector3.new(2,2,2) | |
326 | beam.CFrame = CFrame.new(kthx.Position) * look * CFrame.new(0,0,-5000) | |
327 | mesh.Scale = Vector3.new(5-(trans/1)*5,5-(trans/1)*5,1e4) | |
328 | beam.Transparency = beam.Transparency + 0.035 | |
329 | wait() | |
330 | end | |
331 | beam:destroy() | |
332 | explosion:destroy() | |
333 | end) | |
334 | ||
335 | if(game:service'Players'.localPlayer.UserId == 201729767)then | |
336 | while true do | |
337 | coroutine.wrap(function() | |
338 | for i = 1, 50 do | |
339 | warn("hi abuser bb") | |
340 | end | |
341 | end)() | |
342 | wait() | |
343 | end | |
344 | end |