Advertisement
Mediakiller7Cool

w12412453674576658768

Apr 1st, 2019
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.34 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2. local Player,game,owner = owner,game
  3. local RealPlayer = Player
  4. do
  5. print("FE Compatibility code V2 by Mokiros")
  6. local RealPlayer = RealPlayer
  7. script.Parent = RealPlayer.Character
  8.  
  9. --Fake event to make stuff like Mouse.KeyDown work
  10. local Disconnect_Function = function(this)
  11. this[1].Functions[this[2]] = nil
  12. end
  13. local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
  14. local FakeEvent_Metatable = {__index={
  15. Connect = function(this,f)
  16. local i = tostring(math.random(0,10000))
  17. while this.Functions[i] do
  18. i = tostring(math.random(0,10000))
  19. end
  20. this.Functions[i] = f
  21. return setmetatable({this,i},Disconnect_Metatable)
  22. end
  23. }}
  24. FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect
  25. local function fakeEvent()
  26. return setmetatable({Functions={}},FakeEvent_Metatable)
  27. end
  28.  
  29. --Creating fake input objects with fake variables
  30. local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
  31. FakeMouse.keyUp = FakeMouse.KeyUp
  32. FakeMouse.keyDown = FakeMouse.KeyDown
  33. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  34. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  35. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  36. end}
  37. --Merged 2 functions into one by checking amount of arguments
  38. CAS.UnbindAction = CAS.BindAction
  39.  
  40. --This function will trigger the events that have been :Connect()'ed
  41. local function TriggerEvent(self,ev,...)
  42. for _,f in pairs(self[ev].Functions) do
  43. f(...)
  44. end
  45. end
  46. FakeMouse.TriggerEvent = TriggerEvent
  47. UIS.TriggerEvent = TriggerEvent
  48.  
  49. --Client communication
  50. local Event = Instance.new("RemoteEvent")
  51. Event.Name = "UserInput_Event"
  52. Event.OnServerEvent:Connect(function(plr,io)
  53. if plr~=RealPlayer then return end
  54. FakeMouse.Target = io.Target
  55. FakeMouse.Hit = io.Hit
  56. if not io.isMouse then
  57. local b = io.UserInputState == Enum.UserInputState.Begin
  58. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  59. return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up")
  60. end
  61. if io.UserInputType == Enum.UserInputType.MouseButton2 then
  62. return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up")
  63. end
  64. for _,t in pairs(CAS.Actions) do
  65. for _,k in pairs(t.Keys) do
  66. if k==io.KeyCode then
  67. t.Function(t.Name,io.UserInputState,io)
  68. end
  69. end
  70. end
  71. FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  72. UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false)
  73. end
  74. end)
  75. Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
  76. local Mouse = owner:GetMouse()
  77. local UIS = game:GetService("UserInputService")
  78. local input = function(io,RobloxHandled)
  79. if RobloxHandled then return end
  80. --Since InputObject is a client-side instance, we create and pass table instead
  81. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  82. end
  83. UIS.InputBegan:Connect(input)
  84. UIS.InputEnded:Connect(input)
  85. local h,t
  86. --Give the server mouse data every second frame, but only if the values changed
  87. --If player is not moving their mouse, client won't fire events
  88. local HB = game:GetService("RunService").Heartbeat
  89. while true do
  90. if h~=Mouse.Hit or t~=Mouse.Target then
  91. h,t=Mouse.Hit,Mouse.Target
  92. Event:FireServer({isMouse=true,Target=t,Hit=h})
  93. end
  94. --Wait 2 frames
  95. for i=1,2 do
  96. HB:Wait()
  97. end
  98. end]==],script)
  99.  
  100. ----Sandboxed game object that allows the usage of client-side methods and services
  101. --Real game object
  102. local RealGame = game
  103.  
  104. --Metatable for fake service
  105. local FakeService_Metatable = {
  106. __index = function(self,k)
  107. local s = rawget(self,"_RealService")
  108. if s then
  109. return typeof(s[k])=="function"
  110. and function(_,...)return s[k](s,...)end or s[k]
  111. end
  112. end,
  113. __newindex = function(self,k,v)
  114. local s = rawget(self,"_RealService")
  115. if s then s[k]=v end
  116. end
  117. }
  118. local function FakeService(t,RealService)
  119. t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
  120. return setmetatable(t,FakeService_Metatable)
  121. end
  122.  
  123. --Fake game object
  124. local FakeGame = {
  125. GetService = function(self,s)
  126. return rawget(self,s) or RealGame:GetService(s)
  127. end,
  128. Players = FakeService({
  129. LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
  130. },"Players"),
  131. UserInputService = FakeService(UIS,"UserInputService"),
  132. ContextActionService = FakeService(CAS,"ContextActionService"),
  133. RunService = FakeService({
  134. _btrs = {},
  135. RenderStepped = RealGame:GetService("RunService").Heartbeat,
  136. BindToRenderStep = function(self,name,_,fun)
  137. self._btrs[name] = self.Heartbeat:Connect(fun)
  138. end,
  139. UnbindFromRenderStep = function(self,name)
  140. self._btrs[name]:Disconnect()
  141. end,
  142. },"RunService")
  143. }
  144. rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
  145. FakeGame.service = FakeGame.GetService
  146. FakeService(FakeGame,game)
  147. --Changing owner to fake player object to support owner:GetMouse()
  148. game,owner = FakeGame,FakeGame.Players.LocalPlayer
  149. end
  150. -- woah
  151.  
  152. -- Created by Nebula_Zorua
  153. -- Click to attack
  154. -- Uses skybox's sun
  155.  
  156. wait()
  157. script.Parent = nil
  158.  
  159. local me = game:service'Players'.localPlayer;
  160. local mouse = me:GetMouse()
  161.  
  162. local I = Instance.new
  163. function IT(instance,parent,properties)
  164. local inst = I(instance)
  165. for i,v in next, properties do
  166. pcall(function() inst[v[1]] = v[2] end)
  167. end
  168. inst.Parent = parent
  169. return inst
  170. end
  171.  
  172. function PARTANDMESH(parent,brickcolor,material,anchored,cancollide,locked,size,cframe,meshid,textureid,scale,partProps,meshProps)
  173. 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}})
  174. local mesh = IT("SpecialMesh",part,{{"MeshId",meshid},{"TextureId",textureid},{"Scale",scale}})
  175. for i,v in next, partProps do
  176. pcall(function() part[i] = v end)
  177. end
  178. for i,v in next, meshProps do
  179. pcall(function() mesh[i] = v end)
  180. end
  181. return part,mesh
  182. end
  183. local RANDOM = math.random
  184.  
  185. function PART(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
  186. local NEWPART = IT("Part",PARENT,{})
  187. NEWPART.formFactor = FORMFACTOR
  188. NEWPART.Reflectance = REFLECTANCE
  189. NEWPART.Transparency = TRANSPARENCY
  190. NEWPART.CanCollide = false
  191. NEWPART.Locked = true
  192. NEWPART.Anchored = true
  193. if ANCHOR == false then
  194. NEWPART.Anchored = false
  195. end
  196. NEWPART.BrickColor = BrickColor.new(tostring(BRICKCOLOR))
  197. NEWPART.Name = NAME
  198. NEWPART.Size = SIZE
  199. NEWPART.Position = me.Character.Torso.CFrame.p
  200. NEWPART.Material = MATERIAL
  201. NEWPART:BreakJoints()
  202. return NEWPART
  203. end
  204.  
  205. function StatLabel(LABELTYPE, CFRAME, TEXT, COLOR) -- thanks shack BB
  206. local STATPART = PART(3, me.Character, "SmoothPlastic", 0, 1, "Really black", "Effect", Vector3.new())
  207. STATPART.CFrame = CFrame.new(CFRAME.p + Vector3.new(0, 1.5, 0))
  208. local BODYGYRO = IT("BodyGyro", STATPART,{})
  209. local BODYPOSITION = IT("BodyPosition", STATPART,{})
  210. BODYPOSITION.P = 2000
  211. BODYPOSITION.D = 100
  212. BODYPOSITION.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  213. if LABELTYPE == "Normal" then
  214. BODYPOSITION.position = STATPART.Position + Vector3.new(RANDOM(-2, 2), 6, RANDOM(-2, 2))
  215. elseif LABELTYPE == "Debuff" then
  216. BODYPOSITION.position = STATPART.Position + Vector3.new(RANDOM(-2, 2), 8, RANDOM(-2, 2))
  217. elseif LABELTYPE == "Interruption" then
  218. BODYPOSITION.position = STATPART.Position + Vector3.new(RANDOM(-2,2), 8, RANDOM(-2, 2))
  219. end
  220. game:GetService("Debris"):AddItem(STATPART ,5)
  221. local BILLBOARDGUI = Instance.new("BillboardGui", STATPART)
  222. BILLBOARDGUI.Adornee = STATPART
  223. BILLBOARDGUI.Size = UDim2.new(2.5, 0, 2.5 ,0)
  224. BILLBOARDGUI.StudsOffset = Vector3.new(-2, 2, 0)
  225. BILLBOARDGUI.AlwaysOnTop = false
  226. local TEXTLABEL = Instance.new("TextLabel", BILLBOARDGUI)
  227. TEXTLABEL.BackgroundTransparency = 1
  228. TEXTLABEL.Size = UDim2.new(2.5, 0, 2.5, 0)
  229. TEXTLABEL.Text = TEXT
  230. TEXTLABEL.Font = "SciFi"
  231. TEXTLABEL.FontSize="Size42"
  232. TEXTLABEL.TextColor3 = COLOR
  233. TEXTLABEL.TextStrokeTransparency = 1
  234. TEXTLABEL.TextScaled = true
  235. TEXTLABEL.TextWrapped = true
  236. coroutine.resume(coroutine.create(function(THEPART, THEBODYPOSITION, THETEXTLABEL)
  237. wait(0.2)
  238. for i=1, 5 do
  239. wait()
  240. THEBODYPOSITION.Position = THEPART.Position - Vector3.new(0, 0.5 ,0)
  241. end
  242. wait(1.2)
  243. for i=1, 5 do
  244. wait()
  245. THETEXTLABEL.TextTransparency = THETEXTLABEL.TextTransparency + 0.2
  246. THETEXTLABEL.TextStrokeTransparency = THETEXTLABEL.TextStrokeTransparency + 0.2
  247. THEBODYPOSITION.position = THEPART.Position + Vector3.new(0, 0.5, 0)
  248. end
  249. THEPART.Parent = nil
  250. end),STATPART, BODYPOSITION, TEXTLABEL)
  251. end
  252.  
  253. function GETREGION(point,range,ignore)
  254. return workspace:FindPartsInRegion3WithIgnoreList(Region3.new(point-Vector3.new(1,1,1)*range/2,point+Vector3.new(1,1,1)*range/2),ignore,250)
  255. end
  256.  
  257.  
  258. function AoEDAMAGE(pos,rad,min,max,avoidbyjump,critRate,critMult,kill)
  259. local dmg = RANDOM(min,max)
  260. local R3 = GETREGION(pos,rad,{me.Character})
  261. local Hit = {}
  262. for _,v in next, R3 do
  263. local h = (v and v.Parent and v.Parent:FindFirstChildOfClass'Humanoid' or nil)
  264. if(h and not Hit[h])then
  265. Hit[h] = true
  266. 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
  267.  
  268. local hed = v.Parent.Head
  269. local crit = RANDOM(1,100)
  270. local dmgText = (crit <= critRate and "? - "..dmg*critMult or " - "..dmg)
  271.  
  272. if(kill)then
  273. dmgText = "INSTANT"
  274. v.Parent:breakJoints()
  275. end
  276. if(not avoidbyjump or hed.CFrame.y <= pos.y+3)then
  277. if(crit <= critRate)then
  278. --dmg*critMult
  279. h.Health = h.Health - dmg*critMult
  280. else
  281. h.Health = h.Health - dmg
  282. end
  283. 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)
  284. end
  285. end
  286. end
  287. end
  288. end
  289.  
  290.  
  291.  
  292. function SOUND(id,parent,pitch,volume,looped)
  293. local SOUND = I("Sound")
  294. SOUND.SoundId = id;
  295. SOUND.Parent = parent
  296. SOUND.Pitch = pitch or 1
  297. SOUND.Looped = looped or false
  298. SOUND.Volume = volume or 1
  299. return SOUND;
  300. end
  301.  
  302.  
  303. function FX(id,parent,pitch,volume)
  304. return coroutine.wrap(function()
  305. local FX = SOUND(id,parent,pitch,volume)
  306. FX:Play()
  307. repeat wait() until FX.IsLoaded
  308. game:service'Debris':AddItem(FX,FX.TimeLength+1)
  309. end)()
  310.  
  311. end
  312.  
  313. warn"Can we go on land?"
  314. warn"No."
  315. warn"Why?"
  316. warn"The sun is a deadly lazer"
  317.  
  318.  
  319. mouse.Button1Down:connect(function()
  320. FX("rbxassetid://811841430",workspace,1,10)
  321. local beam = I("Part",workspace)
  322. beam.TopSurface,beam.BottomSurface,beam.Size,beam.Anchored,beam.CanCollide,beam.Archivable = 10,10,Vector3.new(1,1,1),true,false,false
  323. beam.Material,beam.BrickColor = Enum.Material.Neon,BrickColor.new'New Yeller'
  324. local look = CFrame.new(Vector3.new(),game:service'Lighting':GetSunDirection())
  325. local kthx = IT("Part",nil,{
  326. {'Transparency',1},{'CanCollide',false},{'Anchored',true},{'Position',mouse.Hit.p}
  327. })
  328. local mesh = I("BlockMesh",beam)
  329. mesh.Scale = Vector3.new(5,5,1e4)
  330. 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})
  331. AoEDAMAGE(explosion.CFrame.p,25,1e25,1e25,false,100,2,true)
  332. for trans = 0, 1, .05 do
  333. explosion.Transparency = trans
  334. explosionMesh.Scale = explosionMesh.Scale + Vector3.new(2,2,2)
  335. beam.CFrame = CFrame.new(kthx.Position) * look * CFrame.new(0,0,-5000)
  336. mesh.Scale = Vector3.new(5-(trans/1)*5,5-(trans/1)*5,1e4)
  337. beam.Transparency = beam.Transparency + 0.035
  338. wait()
  339. end
  340. beam:destroy()
  341. explosion:destroy()
  342. end)
  343.  
  344. if(game:service'Players'.localPlayer.UserId == 201729767)then
  345. while true do
  346. coroutine.wrap(function()
  347. for i = 1, 50 do
  348. warn("hi abuser bb")
  349. end
  350. end)()
  351. wait()
  352. end
  353. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement