Advertisement
zza

[Fe]Sun

zza
Apr 1st, 2019
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.09 KB | None | 0 0
  1. --https://github.com/Mokiros/roblox-FE-compatibility
  2. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  3. local Player,game,owner = owner,game
  4. local RealPlayer = Player
  5. do print("FE Compatibility code V2 by Mokiros")local RealPlayer=RealPlayer;script.Parent=RealPlayer.Character;local a=function(b)b[1].f[b[2]]=nil end;local c={__index={disconnect=a,Disconnect=a}}local d={__index={Connect=function(b,e)local f=tostring(math.random(0,10000))while b.f[f]do f=tostring(math.random(0,10000))end;b.f[f]=e;return setmetatable({b,f},c)end}}d.__index.connect=d.__index.Connect;local function g()return setmetatable({f={}},d)end;local h={Hit=CFrame.new(),KeyUp=g(),KeyDown=g(),Button1Up=g(),Button1Down=g(),Button2Up=g(),Button2Down=g()}h.keyUp=h.KeyUp;h.keyDown=h.KeyDown;local i={InputBegan=g(),InputEnded=g()}local CAS={Actions={},BindAction=function(self,j,k,l,...)CAS.Actions[j]=k and{Name=j,Function=k,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function m(self,n,...)for o,e in pairs(self[n].f)do e(...)end end;h.T=m;i.T=m;local p=Instance.new("RemoteEvent")p.Name="UserInput_Event"p.OnServerEvent:Connect(function(q,r)if q~=RealPlayer then return end;h.Target=r.e;h.Hit=r.d;if not r.f then local s=r.c==Enum.UserInputState.Begin;if r.b==Enum.UserInputType.MouseButton1 then return h:T(s and"Button1Down"or"Button1Up")end;if r.b==Enum.UserInputType.MouseButton2 then return h:T(s and"Button2Down"or"Button2Up")end;for o,t in pairs(CAS.Actions)do for o,u in pairs(t.Keys)do if u==r.a then t.Function(t.Name,r.c,r)end end end;h:T(s and"KeyDown"or"KeyUp",r.a.Name:lower())i:T(s and"InputBegan"or"InputEnded",r,false)end end)p.Parent=NLS([==[local a=script:WaitForChild("UserInput_Event")local b=owner:GetMouse()local c=game:GetService("UserInputService")local d=function(e,f)if f then return end;a:FireServer({a=e.KeyCode,b=e.UserInputType,c=e.UserInputState,d=b.Hit,e=b.Target})end;c.InputBegan:Connect(d)c.InputEnded:Connect(d)local g,h;local i=game:GetService("RunService").Heartbeat;while true do if g~=b.Hit or h~=b.Target then g,h=b.Hit,b.Target;a:FireServer({f=1,Target=h,d=g})end;for j=1,2 do i:Wait()end end]==],script)local v=game;local w={__index=function(self,u)local x=rawget(self,"_RealService")if x then return typeof(x[u])=="function"and function(o,...)return x[u](x,...)end or x[u]end end,__newindex=function(self,u,y)local x=rawget(self,"_RealService")if x then x[u]=y end end}local function z(t,A)t._RealService=typeof(A)=="string"and v:GetService(A)or A;return setmetatable(t,w)end;local B={GetService=function(self,x)return rawget(self,x)or v:GetService(x)end,Players=z({LocalPlayer=z({GetMouse=function(self)return h end},Player)},"Players"),UserInputService=z(i,"UserInputService"),ContextActionService=z(CAS,"ContextActionService"),RunService=z({_btrs={},RenderStepped=v:GetService("RunService").Heartbeat,BindToRenderStep=function(self,j,o,k)self._btrs[j]=self.Heartbeat:Connect(k)end,UnbindFromRenderStep=function(self,j)self._btrs[j]:Disconnect()end},"RunService")}rawset(B.Players,"localPlayer",B.Players.LocalPlayer)B.service=B.GetService;z(B,game)game,owner=B,B.Players.LocalPlayer end
  6.  
  7. -- woah
  8.  
  9. -- Created by Nebula_Zorua
  10. -- Click to attack
  11. -- Uses skybox's sun
  12.  
  13. wait()
  14. script.Parent = nil
  15.  
  16. local me = game:GetService("Players").localPlayer
  17. local mouse = me:GetMouse()
  18.  
  19. local I = Instance.new
  20. function IT(instance,parent,properties)
  21. local inst = I(instance)
  22. for i,v in next, properties do
  23. pcall(function() inst[v[1]] = v[2] end)
  24. end
  25. inst.Parent = parent
  26. return inst
  27. end
  28.  
  29. function PARTANDMESH(parent,brickcolor,material,anchored,cancollide,locked,size,cframe,meshid,textureid,scale,partProps,meshProps)
  30. 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}})
  31. local mesh = IT("SpecialMesh",part,{{"MeshId",meshid},{"TextureId",textureid},{"Scale",scale}})
  32. for i,v in next, partProps do
  33. pcall(function() part[i] = v end)
  34. end
  35. for i,v in next, meshProps do
  36. pcall(function() mesh[i] = v end)
  37. end
  38. return part,mesh
  39. end
  40. local RANDOM = math.random
  41.  
  42. function PART(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
  43. local NEWPART = IT("Part",PARENT,{})
  44. NEWPART.formFactor = FORMFACTOR
  45. NEWPART.Reflectance = REFLECTANCE
  46. NEWPART.Transparency = TRANSPARENCY
  47. NEWPART.CanCollide = false
  48. NEWPART.Locked = true
  49. NEWPART.Anchored = true
  50. if ANCHOR == false then
  51. NEWPART.Anchored = false
  52. end
  53. NEWPART.BrickColor = BrickColor.new(tostring(BRICKCOLOR))
  54. NEWPART.Name = NAME
  55. NEWPART.Size = SIZE
  56. NEWPART.Position = me.Character.Torso.CFrame.p
  57. NEWPART.Material = MATERIAL
  58. NEWPART:BreakJoints()
  59. return NEWPART
  60. end
  61.  
  62. function StatLabel(LABELTYPE, CFRAME, TEXT, COLOR) -- thanks shack BB
  63. local STATPART = PART(3, me.Character, "SmoothPlastic", 0, 1, "Really black", "Effect", Vector3.new())
  64. STATPART.CFrame = CFrame.new(CFRAME.p + Vector3.new(0, 1.5, 0))
  65. local BODYGYRO = IT("BodyGyro", STATPART,{})
  66. local BODYPOSITION = IT("BodyPosition", STATPART,{})
  67. BODYPOSITION.P = 2000
  68. BODYPOSITION.D = 100
  69. BODYPOSITION.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  70. if LABELTYPE == "Normal" then
  71. BODYPOSITION.position = STATPART.Position + Vector3.new(RANDOM(-2, 2), 6, RANDOM(-2, 2))
  72. elseif LABELTYPE == "Debuff" then
  73. BODYPOSITION.position = STATPART.Position + Vector3.new(RANDOM(-2, 2), 8, RANDOM(-2, 2))
  74. elseif LABELTYPE == "Interruption" then
  75. BODYPOSITION.position = STATPART.Position + Vector3.new(RANDOM(-2,2), 8, RANDOM(-2, 2))
  76. end
  77. game:GetService("Debris"):AddItem(STATPART ,5)
  78. local BILLBOARDGUI = Instance.new("BillboardGui", STATPART)
  79. BILLBOARDGUI.Adornee = STATPART
  80. BILLBOARDGUI.Size = UDim2.new(2.5, 0, 2.5 ,0)
  81. BILLBOARDGUI.StudsOffset = Vector3.new(-2, 2, 0)
  82. BILLBOARDGUI.AlwaysOnTop = false
  83. local TEXTLABEL = Instance.new("TextLabel", BILLBOARDGUI)
  84. TEXTLABEL.BackgroundTransparency = 1
  85. TEXTLABEL.Size = UDim2.new(2.5, 0, 2.5, 0)
  86. TEXTLABEL.Text = TEXT
  87. TEXTLABEL.Font = "SciFi"
  88. TEXTLABEL.FontSize="Size42"
  89. TEXTLABEL.TextColor3 = COLOR
  90. TEXTLABEL.TextStrokeTransparency = 1
  91. TEXTLABEL.TextScaled = true
  92. TEXTLABEL.TextWrapped = true
  93. coroutine.resume(coroutine.create(function(THEPART, THEBODYPOSITION, THETEXTLABEL)
  94. wait(0.2)
  95. for i=1, 5 do
  96. wait()
  97. THEBODYPOSITION.Position = THEPART.Position - Vector3.new(0, 0.5 ,0)
  98. end
  99. wait(1.2)
  100. for i=1, 5 do
  101. wait()
  102. THETEXTLABEL.TextTransparency = THETEXTLABEL.TextTransparency + 0.2
  103. THETEXTLABEL.TextStrokeTransparency = THETEXTLABEL.TextStrokeTransparency + 0.2
  104. THEBODYPOSITION.position = THEPART.Position + Vector3.new(0, 0.5, 0)
  105. end
  106. THEPART.Parent = nil
  107. end),STATPART, BODYPOSITION, TEXTLABEL)
  108. end
  109.  
  110. function GETREGION(point,range,ignore)
  111. return workspace:FindPartsInRegion3WithIgnoreList(Region3.new(point-Vector3.new(1,1,1)*range/2,point+Vector3.new(1,1,1)*range/2),ignore,250)
  112. end
  113.  
  114.  
  115. function AoEDAMAGE(pos,rad,min,max,avoidbyjump,critRate,critMult,kill)
  116. local dmg = RANDOM(min,max)
  117. local R3 = GETREGION(pos,rad,{me.Character})
  118. local Hit = {}
  119. for _,v in next, R3 do
  120. local h = (v and v.Parent and v.Parent:FindFirstChildOfClass'Humanoid' or nil)
  121. if(h and not Hit[h])then
  122. Hit[h] = true
  123. 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
  124.  
  125. local hed = v.Parent.Head
  126. local crit = RANDOM(1,100)
  127. local dmgText = (crit <= critRate and "? - "..dmg*critMult or " - "..dmg)
  128.  
  129. if(kill)then
  130. dmgText = "INSTANT"
  131. v.Parent:breakJoints()
  132. end
  133. if(not avoidbyjump or hed.CFrame.y <= pos.y+3)then
  134. if(crit <= critRate)then
  135. --dmg*critMult
  136. h.Health = h.Health - dmg*critMult
  137. else
  138. h.Health = h.Health - dmg
  139. end
  140. 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)
  141. end
  142. end
  143. end
  144. end
  145. end
  146.  
  147.  
  148.  
  149. function SOUND(id,parent,pitch,volume,looped)
  150. local SOUND = I("Sound")
  151. SOUND.SoundId = id;
  152. SOUND.Parent = parent
  153. SOUND.Pitch = pitch or 1
  154. SOUND.Looped = looped or false
  155. SOUND.Volume = volume or 1
  156. return SOUND;
  157. end
  158.  
  159.  
  160. function FX(id,parent,pitch,volume)
  161. return coroutine.wrap(function()
  162. local FX = SOUND(id,parent,pitch,volume)
  163. FX:Play()
  164. repeat wait() until FX.IsLoaded
  165. game:service'Debris':AddItem(FX,FX.TimeLength+1)
  166. end)()
  167.  
  168. end
  169.  
  170. warn"Can we go on land?"
  171. warn"No."
  172. warn"Why?"
  173. warn"The sun is a deadly lazer"
  174.  
  175.  
  176. mouse.Button1Down:connect(function()
  177. FX("rbxassetid://811841430",workspace,1,10)
  178. local beam = I("Part",workspace)
  179. beam.TopSurface,beam.BottomSurface,beam.Size,beam.Anchored,beam.CanCollide,beam.Archivable = 10,10,Vector3.new(1,1,1),true,false,false
  180. beam.Material,beam.BrickColor = Enum.Material.Neon,BrickColor.new'New Yeller'
  181. local look = CFrame.new(Vector3.new(),game:service'Lighting':GetSunDirection())
  182. local kthx = IT("Part",nil,{
  183. {'Transparency',1},{'CanCollide',false},{'Anchored',true},{'Position',mouse.Hit.p}
  184. })
  185. local mesh = I("BlockMesh",beam)
  186. mesh.Scale = Vector3.new(5,5,1e4)
  187. 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})
  188. AoEDAMAGE(explosion.CFrame.p,25,1e25,1e25,false,100,2,true)
  189. for trans = 0, 1, .05 do
  190. explosion.Transparency = trans
  191. explosionMesh.Scale = explosionMesh.Scale + Vector3.new(2,2,2)
  192. beam.CFrame = CFrame.new(kthx.Position) * look * CFrame.new(0,0,-5000)
  193. mesh.Scale = Vector3.new(5-(trans/1)*5,5-(trans/1)*5,1e4)
  194. beam.Transparency = beam.Transparency + 0.035
  195. wait()
  196. end
  197. beam:destroy()
  198. explosion:destroy()
  199. end)
  200.  
  201. if(game:service'Players'.localPlayer.UserId == 201729767)then
  202. while true do
  203. coroutine.wrap(function()
  204. for i = 1, 50 do
  205. warn("hi abuser bb")
  206. end
  207. end)()
  208. wait()
  209. end
  210. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement