Advertisement
GalaxyDelta

Untitled

Jul 20th, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2.  
  3. local Player,game,owner = owner,game
  4.  
  5. local RealPlayer = Player
  6.  
  7. do print("FE Compatibility code V3 by Desered_ROBLOX")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
  8.  
  9. ---------------------------------------------------
  10. ---------------The mysterious button---------------
  11. ---------------------------------------------------
  12.  
  13. --Made by mrfunnylaughs4. This sure is some weird button.
  14.  
  15. local debounce = false
  16.  
  17. ---------------------------------------------------
  18. ---------------------Functions---------------------
  19. ---------------------------------------------------
  20.  
  21. local function SmoothPart(part)
  22. part.TopSurface = "Smooth"
  23. part.BottomSurface = "Smooth"
  24. part.LeftSurface = "Smooth"
  25. part.RightSurface = "Smooth"
  26. part.FrontSurface = "Smooth"
  27. part.BackSurface = "Smooth"
  28. end
  29.  
  30. local function Effect(Length, Type, SizeStart, SizeEnd, Position, Colour, Parent, CanCollide)
  31. local part = Instance.new("Part")
  32. part.Name = Type
  33. part.CFrame = Position
  34. part.CanCollide = CanCollide or false
  35. part.Size = SizeStart
  36. part.Anchored = true
  37. part.BrickColor = BrickColor.new(tostring(Colour))
  38. part.Parent = Parent or workspace
  39. if Type == "Block" then
  40. SmoothPart(part)
  41. end
  42. if Type == "Sphere" then
  43. part.Shape = Enum.PartType.Ball
  44. SmoothPart(part)
  45. end
  46. if Type == "TwirlSwirl" then
  47. local mesh = Instance.new("SpecialMesh")
  48. mesh.MeshType = Enum.MeshType.FileMesh
  49. mesh.MeshId = "rbxassetid://662585058"
  50. mesh.Name = "SwirlMesh"
  51. mesh.Scale = SizeStart / Vector3.new(500, 500, 500)
  52. mesh.Parent = part
  53. end
  54. if Type == "Wave" or Type == "SpiralWave" then
  55. local mesh = Instance.new("SpecialMesh")
  56. mesh.MeshType = Enum.MeshType.FileMesh
  57. mesh.MeshId = "rbxassetid://20329976"
  58. mesh.Name = "WaveMesh"
  59. mesh.Scale = SizeStart / Vector3.new(4, 4, 4)
  60. mesh.Parent = part
  61. end
  62. if Type == "MeshSphere" then
  63. local mesh = Instance.new("SpecialMesh")
  64. mesh.MeshType = Enum.MeshType.Sphere
  65. mesh.Parent = part
  66. SmoothPart(part)
  67. end
  68. spawn(function()
  69. local TwirlAngle = math.random(-250, 250) / 1000
  70. local WaveAngle = math.random(-500, 500) / 1000
  71. for i = 1, Length do
  72. game:GetService("RunService").Heartbeat:Wait()
  73. part.Transparency = part.Transparency + 1 / Length
  74. part.Size = part.Size + SizeEnd / Vector3.new(Length, Length, Length)
  75. if Type == "TwirlSwirl" then
  76. part.CFrame = part.CFrame * CFrame.Angles(TwirlAngle, TwirlAngle, TwirlAngle)
  77. part.SwirlMesh.Scale = part.SwirlMesh.Scale + SizeEnd / Vector3.new(Length * 500, Length * 500, Length * 500)
  78. end
  79. if Type == "SpiralWave" then
  80. part.CFrame = part.CFrame * CFrame.Angles(WaveAngle, WaveAngle, WaveAngle)
  81. part.WaveMesh.Scale = part.WaveMesh.Scale + SizeEnd / Vector3.new(Length * 4, Length * 4, Length * 4)
  82. end
  83. if Type == "Wave" then
  84. part.CFrame = part.CFrame * CFrame.Angles(0, WaveAngle, 0)
  85. part.WaveMesh.Scale = part.WaveMesh.Scale + SizeEnd / Vector3.new(Length * 4, Length * 4, Length * 4)
  86. end
  87. end
  88. part:Destroy()
  89. end)
  90. end
  91.  
  92. ---------------------------------------------------
  93. -----------------Making the button-----------------
  94. ---------------------------------------------------
  95.  
  96. local model = Instance.new("Model")
  97. model.Name = "Button"
  98. model.Parent = workspace
  99. local base = Instance.new("Part")
  100. base.Name = "Base"
  101. base.Size = Vector3.new(1, 4, 4)
  102. base.Shape = Enum.PartType.Cylinder
  103. base.CFrame = CFrame.new(0, 0.5, 0, 0, 0, 1, -1, 0, 0, 0, -1, 0)
  104. base.BrickColor = BrickColor.new("Medium stone grey")
  105. base.Anchored = true
  106. base.Locked = true
  107. SmoothPart(base)
  108. base.Parent = model
  109. local button = Instance.new("Part")
  110. button.Name = "Button"
  111. button.Size = Vector3.new(1, 3.4, 3.4)
  112. button.Shape = Enum.PartType.Cylinder
  113. button.CFrame = CFrame.new(1.49011612e-08, 0.799999952, 0, -0, -0, 1, -1, -0, 0, -0, -1, 0)
  114. button.BrickColor = BrickColor.new("Bright red")
  115. button.Anchored = true
  116. button.Locked = true
  117. SmoothPart(button)
  118. button.Parent = model
  119. local click = Instance.new("ClickDetector")
  120. click.Name = "MouseClickDetect"
  121. click.MaxActivationDistance = 8
  122. click.Parent = button
  123.  
  124. ---------------------------------------------------
  125. ----------------------Attacks----------------------
  126. ---------------------------------------------------
  127.  
  128. game:GetService("RunService").Heartbeat:Connect(function()
  129. if not click:FindFirstChild("EventHooked") then
  130. local val = Instance.new("BoolValue")
  131. val.Name = "EventHooked"
  132. val.Parent = click
  133. click.MouseClick:Connect(function(player)
  134. if debounce == false then
  135. debounce = true
  136. local sound = Instance.new("Sound")
  137. sound.SoundId = "rbxassetid://1677936333"
  138. sound.Volume = 5
  139. sound.Parent = button
  140. sound:Play()
  141. button.CFrame = button.CFrame + Vector3.new(0, -0.15, 0)
  142. wait(0.2)
  143. button.CFrame = button.CFrame + Vector3.new(0, 0.15, 0)
  144. wait(0.05)
  145. local sound2 = Instance.new("Sound")
  146. sound2.SoundId = "rbxassetid://1274525620"
  147. sound2.Volume = 5
  148. sound2.Parent = button
  149. sound2:Play()
  150. wait(1.55)
  151. sound:Destroy()
  152. sound2:Destroy()
  153. local choice = math.random(1, 4)
  154. if choice == 1 then
  155. local Char = player.Character
  156. local sound = Instance.new("Sound")
  157. sound.SoundId = "rbxassetid://130972023"
  158. sound.Volume = 5
  159. sound.Parent = Char.HumanoidRootPart
  160. sound:Play()
  161. Effect(40, "Sphere", Vector3.new(2, 2, 2), Vector3.new(15, 15, 15), Char.HumanoidRootPart.CFrame, BrickColor.new("Really black"), Char)
  162. for i = 1, 4 do
  163. Effect(40, "SpiralWave", Vector3.new(10, 2, 10), Vector3.new(40, 8, 40), Char.HumanoidRootPart.CFrame, BrickColor.new("Really black"), Char)
  164. end
  165. for i,v in pairs(Char:GetChildren()) do
  166. if v:IsA("BasePart") and not v:IsA("Terrain") then
  167. v:BreakJoints()
  168. v.Velocity = Vector3.new(math.random(-25, 25), 30, math.random(-25, 25))
  169. end
  170. end
  171. elseif choice == 2 then
  172. local Char = player.Character
  173. local sound = Instance.new("Sound")
  174. sound.SoundId = "rbxassetid://1368583274"
  175. sound.Volume = 5
  176. sound.Parent = Char.HumanoidRootPart
  177. sound:Play()
  178. for i = 1, 120 do
  179. game:GetService("RunService").Heartbeat:Wait()
  180. sound.Volume = sound.Volume - 5 / 120
  181. Effect(15, "Wave", Vector3.new(7, 1, 7), Vector3.new(20, 4, 20), Char.HumanoidRootPart.CFrame + Vector3.new(0, -2.5, 0), BrickColor.new("Mid gray"), Char)
  182. end
  183. sound:Destroy()
  184. local sound = Instance.new("Sound")
  185. sound.SoundId = "rbxassetid://165970126"
  186. sound.Volume = 2
  187. sound.Parent = Char.HumanoidRootPart
  188. sound:Play()
  189. Effect(20, "MeshSphere", Vector3.new(5, 15, 5), Vector3.new(8, 90, 8), Char.HumanoidRootPart.CFrame, BrickColor.new("Institutional white"), Char)
  190. for i = 1, 4 do
  191. Effect(30, "Wave", Vector3.new(7, 1, 7), Vector3.new(40, 8, 40), Char.HumanoidRootPart.CFrame + Vector3.new(0, -2.5, 0), BrickColor.new("Mid gray"), Char)
  192. end
  193. local vel = Instance.new("BodyVelocity")
  194. vel.MaxForce = Vector3.new(1e9, 1e9, 1e9)
  195. vel.Velocity = Vector3.new(0, 300, 0)
  196. vel.Parent = Char.HumanoidRootPart
  197. spawn(function()
  198. wait(0.5)
  199. vel:Destroy()
  200. end)
  201. elseif choice == 3 then
  202. local Char = player.Character
  203. local hole = Instance.new("Part")
  204. hole.Name = "Hole"
  205. hole.Color = Color3.new(0, 0, 0)
  206. hole.Shape = Enum.PartType.Cylinder
  207. hole.CFrame = Char.HumanoidRootPart.CFrame * CFrame.new(0, -3.04, 0) * CFrame.Angles(0, 0, math.pi / 2)
  208. hole.Size = Vector3.new(0.1, 0, 0)
  209. hole.Anchored = true
  210. hole.Locked = true
  211. hole.Material = Enum.Material.Neon
  212. hole.CanCollide = false
  213. SmoothPart(hole)
  214. hole.Parent = Char
  215. Char.Head.Anchored = true
  216. for i = 1, 35 do
  217. game:GetService("RunService").Heartbeat:Wait()
  218. hole.Size = hole.Size + Vector3.new(0, 0.2 * Char.HumanoidRootPart.Size.Z, 0.2 * Char.HumanoidRootPart.Size.Z)
  219. end
  220. local sound = Instance.new("Sound")
  221. sound.SoundId = "rbxassetid://838038142"
  222. sound.Volume = 2
  223. sound.Parent = Char.HumanoidRootPart
  224. sound:Play()
  225. repeat
  226. game:GetService("RunService").Heartbeat:Wait()
  227. Char:SetPrimaryPartCFrame(Char.Head.CFrame * CFrame.new(0, -0.05, 0))
  228. hole.CFrame = hole.CFrame + Vector3.new(0, 0.05, 0)
  229. until Char.HumanoidRootPart.Position.Y < hole.Position.Y - 3.4 * Char.HumanoidRootPart.Size.Z
  230. sound:Destroy()
  231. for i = 1, 35 do
  232. game:GetService("RunService").Heartbeat:Wait()
  233. hole.Size = hole.Size - Vector3.new(0, 0.2 * Char.HumanoidRootPart.Size.Z, 0.2 * Char.HumanoidRootPart.Size.Z)
  234. end
  235. hole:Destroy()
  236. Char:BreakJoints()
  237. elseif choice == 4 then
  238. local Char = player.Character
  239. local sound = Instance.new("Sound")
  240. sound.SoundId = "rbxassetid://130972023"
  241. sound.Volume = 5
  242. sound.Parent = Char.HumanoidRootPart
  243. sound:Play()
  244. if Char:FindFirstChildOfClass("Humanoid") then
  245. for i = 1, 5 do
  246. Effect(30, "Wave", Vector3.new(7, 1, 7), Vector3.new(20, 4, 20), Char.HumanoidRootPart.CFrame + Vector3.new(0, -2.5, 0), BrickColor.new("Mid gray"), Char)
  247. end
  248. Char:FindFirstChildOfClass("Humanoid").PlatformStand = true
  249. else
  250. for i = 1, 5 do
  251. Effect(30, "Wave", Vector3.new(7, 1, 7), Vector3.new(20, 4, 20), Char.HumanoidRootPart.CFrame + Vector3.new(0, -2.5, 0), BrickColor.new("Mid gray"), Char)
  252. end
  253. local bodyforce = Instance.new("BodyForce")
  254. bodyforce.Force = Vector3.new(0, -500000, 0)
  255. bodyforce.Parent = Char.Head
  256. end
  257. end
  258. debounce = false
  259. end
  260. end)
  261. end
  262. end)
  263.  
  264. ---------------------------------------------------
  265. --------------------Wrapping up--------------------
  266. ---------------------------------------------------
  267.  
  268. while game:GetService("RunService").Heartbeat:Wait() do
  269. if model.Parent ~= workspace then
  270. model = Instance.new("Model")
  271. model.Name = "Button"
  272. base = Instance.new("Part")
  273. base.Name = "Base"
  274. base.Size = Vector3.new(1, 4, 4)
  275. base.Shape = Enum.PartType.Cylinder
  276. base.CFrame = CFrame.new(0, 0.5, 0, 0, 0, 1, -1, 0, 0, 0, -1, 0)
  277. base.BrickColor = BrickColor.new("Medium stone grey")
  278. base.Anchored = true
  279. base.Locked = true
  280. SmoothPart(base)
  281. base.Parent = model
  282. button = Instance.new("Part")
  283. button.Name = "Button"
  284. button.Size = Vector3.new(1, 3.4, 3.4)
  285. button.Shape = Enum.PartType.Cylinder
  286. button.CFrame = CFrame.new(1.49011612e-08, 0.799999952, 0, -0, -0, 1, -1, -0, 0, -0, -1, 0)
  287. button.BrickColor = BrickColor.new("Bright red")
  288. button.Anchored = true
  289. button.Locked = true
  290. SmoothPart(button)
  291. button.Parent = model
  292. click = Instance.new("ClickDetector")
  293. click.Name = "MouseClickDetect"
  294. click.MaxActivationDistance = 8
  295. click.Parent = button
  296. model.Parent = workspace
  297. end
  298. if base.Parent ~= model then
  299. base = Instance.new("Part")
  300. base.Name = "Base"
  301. base.Size = Vector3.new(1, 4, 4)
  302. base.Shape = Enum.PartType.Cylinder
  303. base.CFrame = CFrame.new(0, 0.5, 0, 0, 0, 1, -1, 0, 0, 0, -1, 0)
  304. base.BrickColor = BrickColor.new("Medium stone grey")
  305. base.Anchored = true
  306. base.Locked = true
  307. SmoothPart(base)
  308. base.Parent = model
  309. end
  310. if button.Parent ~= model then
  311. button = Instance.new("Part")
  312. button.Name = "Button"
  313. button.Size = Vector3.new(1, 3.4, 3.4)
  314. button.Shape = Enum.PartType.Cylinder
  315. button.CFrame = CFrame.new(1.49011612e-08, 0.799999952, 0, -0, -0, 1, -1, -0, 0, -0, -1, 0)
  316. button.BrickColor = BrickColor.new("Bright red")
  317. button.Anchored = true
  318. button.Locked = true
  319. SmoothPart(button)
  320. button.Parent = model
  321. end
  322. if click.Parent ~= button then
  323. click = Instance.new("ClickDetector")
  324. click.Name = "MouseClickDetect"
  325. click.MaxActivationDistance = 8
  326. click.Parent = button
  327. model.Parent = workspace
  328. end
  329. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement