Advertisement
jayrock3401

Untitled

Mar 18th, 2015
269
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.41 KB | None | 0 0
  1. -- This script has been converted to FE by iPxter
  2.  
  3.  
  4. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  5. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  6. do
  7. print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
  8. script.Parent = Player.Character
  9.  
  10. --RemoteEvent for communicating
  11. local Event = Instance.new("RemoteEvent")
  12. Event.Name = "UserInput_Event"
  13.  
  14. --Fake event to make stuff like Mouse.KeyDown work
  15. local function fakeEvent()
  16. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  17. t.connect = t.Connect
  18. return t
  19. end
  20.  
  21. --Creating fake input objects with fake variables
  22. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  23. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  24. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  25. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  26. end}
  27. --Merged 2 functions into one by checking amount of arguments
  28. CAS.UnbindAction = CAS.BindAction
  29.  
  30. --This function will trigger the events that have been :Connect()'ed
  31. local function te(self,ev,...)
  32. local t = m[ev]
  33. if t and t._fakeEvent and t.Function then
  34. t.Function(...)
  35. end
  36. end
  37. m.TrigEvent = te
  38. UIS.TrigEvent = te
  39.  
  40. Event.OnServerEvent:Connect(function(plr,io)
  41. if plr~=Player then return end
  42. if io.isMouse then
  43. m.Target = io.Target
  44. m.Hit = io.Hit
  45. else
  46. local b = io.UserInputState == Enum.UserInputState.Begin
  47. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  48. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  49. end
  50. for _,t in pairs(CAS.Actions) do
  51. for _,k in pairs(t.Keys) do
  52. if k==io.KeyCode then
  53. t.Function(t.Name,io.UserInputState,io)
  54. end
  55. end
  56. end
  57. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  58. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  59. end
  60. end)
  61. Event.Parent = NLS([==[
  62. local Player = game:GetService("Players").LocalPlayer
  63. local Event = script:WaitForChild("UserInput_Event")
  64.  
  65. local UIS = game:GetService("UserInputService")
  66. local input = function(io,a)
  67. if a then return end
  68. --Since InputObject is a client-side instance, we create and pass table instead
  69. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  70. end
  71. UIS.InputBegan:Connect(input)
  72. UIS.InputEnded:Connect(input)
  73.  
  74. local Mouse = Player:GetMouse()
  75. local h,t
  76. --Give the server mouse data 30 times every second, but only if the values changed
  77. --If player is not moving their mouse, client won't fire events
  78. while wait(1/30) do
  79. if h~=Mouse.Hit or t~=Mouse.Target then
  80. h,t=Mouse.Hit,Mouse.Target
  81. Event:FireServer({isMouse=true,Target=t,Hit=h})
  82. end
  83. end]==],Player.Character)
  84. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  85. end
  86. wait(1)
  87. chr = owner
  88. dead = false
  89. model = Instance.new("Model")
  90. model.Parent = chr
  91. circle = Instance.new("Part",model)
  92. model.PrimaryPart = circle
  93. circle.Anchored = true
  94. circle.CanCollide = false
  95. circle.BrickColor = BrickColor.new(Color3.fromRGB(192, 57, 43)) --BRICKCOLOR ONLY GOES TO 1 R(ED)G(REEN)B(LUE)
  96. circle.Size = Vector3.new(.5,.5,.5) --SIZE ONLY CHANGE THE MIDDLE
  97. circle.Transparency = 1 --VISIBILITY OF INSIDE BLOCK
  98. circle.Material = Enum.Material.Neon
  99. rad = 7
  100. circ = 2*math.pi*rad
  101. n = circ/.5
  102. rot = 360/n
  103.  
  104. function gay()
  105. for i = 0,n/2 do
  106. game:GetService('RunService').RenderStepped:wait()
  107. local clone = circle:Clone()
  108. local function tran()
  109. clone.Parent = model
  110. for index = .5,7,.1 do
  111. game:GetService('RunService').RenderStepped:wait()
  112. -- clone.Size = Vector3.new(.5,index,.5)
  113. clone.Transparency = clone.Transparency - .05
  114. clone.CFrame = circle.CFrame*CFrame.Angles(0,0,math.rad(i*(rot*2)))*CFrame.new(rad/2.2,0,0)
  115. end
  116. end
  117. spawn(tran)
  118. end
  119. end
  120. spawn(gay)
  121.  
  122. chr.Humanoid.Died:connect(function()
  123. dead = true
  124. for i,v in pairs(model:GetChildren()) do
  125. local function lerp()
  126. local cframeval = v.CFrame
  127. for i = 0,1,.025 do
  128. game:GetService('RunService').RenderStepped:wait()
  129. v.Size = v.Size - Vector3.new(.025,.025,.025)
  130. v.CFrame = cframeval:lerp(chr.Torso.CFrame,i)
  131. v.Transparency = i*2
  132. end
  133. end
  134. spawn(lerp)
  135. end
  136. end)
  137.  
  138. x = 0
  139. y = 0
  140. z = 0
  141. random = 0
  142. debounce = false
  143.  
  144. colortable={BrickColor.new(Color3.fromRGB(241, 196, 15)),
  145. BrickColor.new(Color3.fromRGB(211, 84, 0)),
  146. BrickColor.new(Color3.fromRGB(41, 128, 185)),
  147. BrickColor.new(Color3.fromRGB(192, 57, 43)),
  148. BrickColor.new(Color3.fromRGB(142, 68, 173)),
  149. BrickColor.new(Color3.fromRGB(26, 188, 156)),
  150. BrickColor.new(Color3.fromRGB(46, 204, 113))}
  151. function changecolor()
  152. if debounce == false then
  153. debounce = true
  154. local children = model:GetChildren()
  155. random = random + 1
  156. if random == 8 then
  157. random = 1
  158. end
  159. for i,v in pairs(children) do
  160. game:GetService('RunService').RenderStepped:wait()
  161. v.BrickColor = colortable[random]
  162. end
  163. debounce = false
  164. end
  165. end
  166. while dead == false do
  167. game:GetService('RunService').RenderStepped:wait()
  168. if x > 360 then
  169. x = 0
  170. spawn(changecolor)
  171. elseif y > 360 then
  172. y = 0
  173. end
  174. x = x + 2
  175. y = y - 4
  176. model:SetPrimaryPartCFrame(chr.HumanoidRootPart.CFrame*CFrame.Angles(math.rad(x),math.rad(y),math.rad(0)))
  177. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement