Advertisement
SSTheEditer

Rainbow Ring | Converted

Feb 23rd, 2019
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.80 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient() then error("Please run as a server script. Use h/ instead of hl/.") end
  2. print("FE Compatibility code by Mokiros")
  3. InternalData = {}
  4. do
  5. script.Parent = owner.Character
  6. local Event = Instance.new("RemoteEvent")
  7. Event.Name = "UserInput"
  8. local function NewFakeEvent()
  9. local Fake = {fakeEvent=true,Connect=function(self,Func)self.Function=Func end}Fake.connect = Fake.Connect
  10. return Fake
  11. end
  12. local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()}
  13. local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()}
  14. local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...)
  15. self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil
  16. end};ContextActionService.UnBindAction = ContextActionService.BindAction
  17. local function TriggerEvent(self,Event,...)
  18. local Trigger = Mouse[Event]
  19. if Trigger and Trigger.fakeEvent and Trigger.Function then
  20. Trigger.Function(...)
  21. end
  22. end
  23. Mouse.TrigEvent = TriggerEvent
  24. UserInputService.TrigEvent = TriggerEvent
  25. Event.OnServerEvent:Connect(function(FiredBy,Input)
  26. if FiredBy.Name ~= owner.Name then end
  27. if Input.MouseEvent then
  28. Mouse.Target = Input.Target
  29. Mouse.Hit = Input.Hit
  30. else
  31. local Begin = Input.UserInputState == Enum.UserInputState.Begin
  32. if Input.UserInputType == Enum.UserInputType.MouseButton1 then
  33. return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up")
  34. end
  35. for _,Action in pairs(ContextActionService.Actions) do
  36. for _,Key in pairs(Action.Keys) do
  37. if Key==Input.KeyCode then
  38. Action.Function(Action.Name,Input.UserInputState,Input)
  39. end
  40. end
  41. end
  42. Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower())
  43. UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false)
  44. end
  45. end)
  46. InternalData["Mouse"] = Mouse
  47. InternalData["ContextActionService"] = ContextActionService
  48. InternalData["UserInputService"] = UserInputService
  49. Event.Parent = NLS([[
  50. local Player = owner
  51. local Event = script:WaitForChild("UserInput")
  52. local UserInputService = game:GetService("UserInputService")
  53. local Mouse = Player:GetMouse()
  54. local Input = function(Input,gameProcessedEvent)
  55. if gameProcessedEvent then return end
  56. Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState})
  57. end
  58. UserInputService.InputBegan:Connect(Input)
  59. UserInputService.InputEnded:Connect(Input)
  60. local Hit,Target
  61. while wait(1/30) do
  62. if Hit ~= Mouse.Hit or Target ~= Mouse.Target then
  63. Hit,Target = Mouse.Hit,Mouse.Target
  64. Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit})
  65. end
  66. end
  67. ]],owner.Character)
  68. end
  69. RealGame = game;game = setmetatable({},{
  70. __index = function (self,Index)
  71. local Sandbox = function (Thing)
  72. if Thing:IsA("Player") then
  73. local RealPlayer = Thing
  74. return setmetatable({},{
  75. __index = function (self,Index)
  76. local Type = type(RealPlayer[Index])
  77. if Type == "function" then
  78. if Index:lower() == "getmouse" or Index:lower() == "mouse" then
  79. return function (self)
  80. return InternalData["Mouse"]
  81. end
  82. end
  83. return function (self,...)
  84. return RealPlayer[Index](RealPlayer,...)
  85. end
  86. else
  87. if Index == "PlrObj" then
  88. return RealPlayer
  89. end
  90. return RealPlayer[Index]
  91. end
  92. end;
  93. __tostring = function(self)
  94. return RealPlayer.Name
  95. end
  96. })
  97. end
  98. end
  99. if RealGame[Index] then
  100. local Type = type(RealGame[Index])
  101. if Type == "function" then
  102. if Index:lower() == "getservice" or Index:lower() == "service" then
  103. return function (self,Service)
  104. if Service:lower() == "players" then
  105. return setmetatable({},{
  106. __index = function (self2,Index2)
  107. local RealService = RealGame:GetService(Service)
  108. local Type2 = type(Index2)
  109. if Type2 == "function" then
  110. return function (self,...)
  111. return RealService[Index2](RealService,...)
  112. end
  113. else
  114. if Index2:lower() == "localplayer" then
  115. return Sandbox(owner)
  116. end
  117. return RealService[Index2]
  118. end
  119. end;
  120. __tostring = function(self)
  121. return RealGame:GetService(Service).Name
  122. end
  123. })
  124. elseif Service:lower() == "contextactionservice" then
  125. return InternalData["ContextActionService"]
  126. elseif Service:lower() == "contextactionservice" then
  127. return InternalData["UserInputService"]
  128. elseif Service:lower() == "runservice" then
  129. return setmetatable({},{
  130. __index = function(self2,Index2)
  131. local RealService = RealGame:GetService(Service)
  132. local Type2 = type(Index2)
  133. if Type2 == "function" then
  134. return function (self,...)
  135. return RealService[Index2](RealService,...)
  136. end
  137. else
  138. if Index2:lower() == "bindtorenderstep" then
  139. return function (self,Name,Priority,Function)
  140. return RealGame:GetService("RunService").Stepped:Connect(Function)
  141. end
  142. end
  143. if Index2:lower() == "renderstepped" then
  144. return RealService["Stepped"]
  145. end
  146. return RealService[Index2]
  147. end
  148. end
  149. })
  150. else
  151. return RealGame:GetService(Service)
  152. end
  153. end
  154. end
  155. return function (self,...)
  156. return RealGame[Index](RealGame,...)
  157. end
  158. else
  159. if game:GetService(Index) then
  160. return game:GetService(Index)
  161. end
  162. return RealGame[Index]
  163. end
  164. else
  165. return nil
  166. end
  167. end
  168. });Game = game;owner = game:GetService("Players").LocalPlayer;script = {}
  169. print("Complete! Running...")
  170.  
  171.  
  172. --//Paste script below this line.
  173.  
  174. wait(1)
  175. chr = game.Players.LocalPlayer.Character or game.Players.LocalPlayer.CharacterAdded:wait()
  176. dead = false
  177. model = Instance.new("Model")
  178. model.Parent = chr
  179. circle = Instance.new("Part",model)
  180. model.PrimaryPart = circle
  181. circle.Anchored = true
  182. circle.CanCollide = false
  183. circle.BrickColor = BrickColor.new(Color3.fromRGB(192, 57, 43)) --BRICKCOLOR ONLY GOES TO 1 R(ED)G(REEN)B(LUE)
  184. circle.Size = Vector3.new(.5,.5,.5) --SIZE ONLY CHANGE THE MIDDLE
  185. circle.Transparency = 1 --VISIBILITY OF INSIDE BLOCK
  186. circle.Material = Enum.Material.Neon
  187. rad = 7
  188. circ = 2*math.pi*rad
  189. n = circ/.5
  190. rot = 360/n
  191.  
  192. function gay()
  193. for i = 0,n/2 do
  194. game:GetService('RunService').RenderStepped:wait()
  195. local clone = circle:Clone()
  196. local function tran()
  197. clone.Parent = model
  198. for index = .5,7,.1 do
  199. game:GetService('RunService').RenderStepped:wait()
  200. -- clone.Size = Vector3.new(.5,index,.5)
  201. clone.Transparency = clone.Transparency - .05
  202. clone.CFrame = circle.CFrame*CFrame.Angles(0,0,math.rad(i*(rot*2)))*CFrame.new(rad/2.2,0,0)
  203. end
  204. end
  205. spawn(tran)
  206. end
  207. end
  208. spawn(gay)
  209.  
  210. chr.Humanoid.Died:connect(function()
  211. dead = true
  212. for i,v in pairs(model:GetChildren()) do
  213. local function lerp()
  214. local cframeval = v.CFrame
  215. for i = 0,1,.025 do
  216. game:GetService('RunService').RenderStepped:wait()
  217. v.Size = v.Size - Vector3.new(.025,.025,.025)
  218. v.CFrame = cframeval:lerp(chr.Torso.CFrame,i)
  219. v.Transparency = i*2
  220. end
  221. end
  222. spawn(lerp)
  223. end
  224. end)
  225.  
  226. x = 0
  227. y = 0
  228. z = 0
  229. random = 0
  230. debounce = false
  231.  
  232. colortable={BrickColor.new(Color3.fromRGB(255, 255, 255)),
  233. BrickColor.new(Color3.fromRGB(0, 0, 165)),
  234. BrickColor.new(Color3.fromRGB(65, 0, 0)),
  235. BrickColor.new(Color3.fromRGB(192, 57, 43)),
  236. BrickColor.new(Color3.fromRGB(142, 68, 173)),
  237. BrickColor.new(Color3.fromRGB(26, 188, 156)),
  238. BrickColor.new(Color3.fromRGB(46, 204, 113))}
  239. function changecolor()
  240. if debounce == false then
  241. debounce = true
  242. local children = model:GetChildren()
  243. random = random + 1
  244. if random == 8 then
  245. random = 1
  246. end
  247. for i,v in pairs(children) do
  248. game:GetService('RunService').RenderStepped:wait()
  249. v.BrickColor = colortable[random]
  250. end
  251. debounce = false
  252. end
  253. end
  254. while dead == false do
  255. game:GetService('RunService').RenderStepped:wait()
  256. if x > 360 then
  257. x = 0
  258. spawn(changecolor)
  259. elseif y > 360 then
  260. y = 0
  261. end
  262. x = x + 2
  263. y = y - 4
  264. model:SetPrimaryPartCFrame(chr.HumanoidRootPart.CFrame*CFrame.Angles(math.rad(x),math.rad(y),math.rad(0)))
  265. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement