Advertisement
wamandnj

Untitled

Sep 21st, 2018
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --{{Made by Strazos}}--
  2. -- This script has been converted to FE by iPxter
  3.  
  4.  
  5. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  6. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  7. do
  8. print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
  9. script.Parent = Player.Character
  10.  
  11. --RemoteEvent for communicating
  12. local Event = Instance.new("RemoteEvent")
  13. Event.Name = "UserInput_Event"
  14.  
  15. --Fake event to make stuff like Mouse.KeyDown work
  16. local function fakeEvent()
  17. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  18. t.connect = t.Connect
  19. return t
  20. end
  21.  
  22. --Creating fake input objects with fake variables
  23. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  24. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  25. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  26. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  27. end}
  28. --Merged 2 functions into one by checking amount of arguments
  29. CAS.UnbindAction = CAS.BindAction
  30.  
  31. --This function will trigger the events that have been :Connect()'ed
  32. local function te(self,ev,...)
  33. local t = m[ev]
  34. if t and t._fakeEvent and t.Function then
  35. t.Function(...)
  36. end
  37. end
  38. m.TrigEvent = te
  39. UIS.TrigEvent = te
  40.  
  41. Event.OnServerEvent:Connect(function(plr,io)
  42. if plr~=Player then return end
  43. if io.isMouse then
  44. m.Target = io.Target
  45. m.Hit = io.Hit
  46. else
  47. local b = io.UserInputState == Enum.UserInputState.Begin
  48. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  49. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  50. end
  51. for _,t in pairs(CAS.Actions) do
  52. for _,k in pairs(t.Keys) do
  53. if k==io.KeyCode then
  54. t.Function(t.Name,io.UserInputState,io)
  55. end
  56. end
  57. end
  58. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  59. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  60. end
  61. end)
  62. Event.Parent = NLS([==[
  63. local Player = game:GetService("Players").LocalPlayer
  64. local Event = script:WaitForChild("UserInput_Event")
  65.  
  66. local UIS = game:GetService("UserInputService")
  67. local input = function(io,a)
  68. if a then return end
  69. --Since InputObject is a client-side instance, we create and pass table instead
  70. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  71. end
  72. UIS.InputBegan:Connect(input)
  73. UIS.InputEnded:Connect(input)
  74.  
  75. local Mouse = Player:GetMouse()
  76. local h,t
  77. --Give the server mouse data 30 times every second, but only if the values changed
  78. --If player is not moving their mouse, client won't fire events
  79. while wait(1/30) do
  80. if h~=Mouse.Hit or t~=Mouse.Target then
  81. h,t=Mouse.Hit,Mouse.Target
  82. Event:FireServer({isMouse=true,Target=t,Hit=h})
  83. end
  84. end]==],Player.Character)
  85. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  86. end
  87.  
  88. local p = owner
  89. local char = p.Character
  90. local larm = char["Left Arm"]
  91. local rarm = char["Right Arm"]
  92. local lleg = char["Left Leg"]
  93. local rleg = char["Right Leg"]
  94. local hed = char.Head
  95. local torso = char.Torso
  96. local hum = char.Humanoid
  97. local weld = Instance.new("Weld",torso)
  98. weld.Part0 = torso
  99.  
  100. larm.Transparency = 1
  101. rarm.Transparency = 1
  102. lleg.Transparency = 1
  103. rleg.Transparency = 1
  104. hed.Transparency = 1
  105. torso.Transparency = 1
  106.  
  107.  
  108. local train = Instance.new("Part",torso)
  109. train.Anchored = true
  110. train.CanCollide = false
  111. train.Size = Vector3.new(1,1,1)
  112. train.CustomPhysicalProperties = PhysicalProperties.new(0,0,0,0,0)
  113. weld.Part1 = train
  114. weld.C1 = CFrame.new(0,-3,0) * CFrame.Angles(0,math.rad(180),0)
  115. train.Anchored = false
  116. local TrainMesh = Instance.new("SpecialMesh",train)
  117. TrainMesh.MeshType = Enum.MeshType.FileMesh
  118. TrainMesh.Scale = Vector3.new(3,3,3)
  119. TrainMesh.MeshId = "rbxassetid://471480829"
  120. TrainMesh.TextureId = "rbxassetid://471480833"
  121.  
  122.  
  123. hum.WalkSpeed = 120;
  124.  
  125.  
  126. for i,v in pairs(char:GetChildren()) do
  127. if v:IsA("Part") then
  128. v.Transparency = 1;
  129. elseif v:IsA("Hat") then
  130. v:Destroy()
  131. elseif v:IsA("Model") then
  132. v:Destroy()
  133. end
  134. end
  135.  
  136.  
  137. local function SFX(id) local s=Instance.new("Sound",torso); s.SoundId = "rbxassetid://"..id; s.Volume = 64364643643; return s; end
  138. train.Touched:connect(function(p)
  139. if p.Parent then
  140. if p.Parent:IsA("Model") then
  141. if game.Players:FindFirstChild(p.Parent.Name) then
  142. if p.Parent.Name ~= game.Players.LocalPlayer.Name then
  143. game.Players:FindFirstChild(p.Parent.Name).Character:BreakJoints()
  144. local Whistle = SFX(154365429)
  145. Whistle:Play()
  146. end
  147. end
  148. end
  149. end
  150. end)
  151.  
  152. local Music = SFX(468775372)
  153. Music.Looped = true;
  154. wait(1)
  155. Music:Play();
  156.  
  157.  
  158. local particleemitter = Instance.new("ParticleEmitter", torso)
  159. particleemitter.Texture = "http://www.roblox.com/asset/?id=243088609"
  160. particleemitter.Lifetime = NumberRange.new(4)
  161. particleemitter.Speed = NumberRange.new(10)
  162. particleemitter.Size = NumberSequence.new({NumberSequenceKeypoint.new(0, 1), NumberSequenceKeypoint.new(1, 2)})
  163. particleemitter.RotSpeed = NumberRange.new(-55, 55)
  164. particleemitter.Rate = 80
  165. particleemitter.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0, 0.7), NumberSequenceKeypoint.new(0.9, 1), NumberSequenceKeypoint.new(1, 1)})
  166. particleemitter.LightEmission = 0
  167. particleemitter.EmissionDirection = "Back"
  168. particleemitter.Color = ColorSequence.new(Color3.new(255,255,255), Color3.new(255,255,255)) --Color here
  169. -------------------------------------------------
  170. --rgb function by Strazos--
  171.  
  172. function HSLtoRGB(hue, sat, light)
  173. local c = light > .5 and (2 - 2 * light) * sat or (2 * light) * sat
  174. local h2 = hue / 60
  175. local x = c * (1 - math.abs((h2 % 2) - 1))
  176. local rgbvals = {{c, x, 0}, {x, c, 0}, {0, c, x}, {0, x, c}, {x, 0, c}, {c, 0, x}}
  177. local rgb = rgbvals[math.floor(h2) + 1]
  178. for i = 1, 3 do rgb[i] = rgb[i] + (light - .5 * c) end
  179. return Color3.new(rgb[1], rgb[2], rgb[3])
  180. end
  181.  
  182. local torso = script.Parent
  183.  
  184. spawn(function()
  185. while wait() do
  186. for i = 1,150 do
  187. wait()
  188. train.Mesh.VertexColor = Vector3.new(HSLtoRGB(i*2,1,0.5).r,HSLtoRGB(i*2,1,0.5).g,HSLtoRGB(i*2,1,0.5).b)
  189. end
  190. local reversei = 150
  191. for i = 1,150 do
  192. wait()
  193. train.Mesh.VertexColor = Vector3.new(HSLtoRGB(reversei*2,1,0.5).r,HSLtoRGB(reversei*2,1,0.5).g,HSLtoRGB(reversei*2,1,0.5).b)
  194. reversei = reversei-1
  195. end
  196. end
  197. end)
  198.  
  199. ---------------------------------------------------
  200. local plr = game.Players.LocalPlayer
  201. local chr = plr.Character
  202. local maus = plr:GetMouse()
  203. local PGui=plr.PlayerGui
  204. local lleg = chr["Left Leg"]
  205. local rleg = chr["Right Leg"]
  206. local larm = chr["Left Arm"]
  207. local rarm = chr["Right Arm"]
  208. local hed = chr.Head
  209. local rutprt = chr.HumanoidRootPart
  210. local torso = chr.Torso
  211. local pseudohead=hed:Clone()
  212. for i,x in pairs(pseudohead:GetChildren()) do if not x.ClassName:find('Mesh') then x:Destroy() end end
  213. pseudohead.Name='PseudoHead'
  214. pseudohead.Parent=chr.Head
  215. local pseudoweld=Instance.new('Weld',torso)
  216. pseudoweld.Part0=hed
  217. pseudoweld.Name='PseudoHeadWeld'
  218. pseudoweld.Part1=pseudohead
  219. hed.Transparency=1
  220. for i,x in pairs(chr:GetChildren()) do
  221. if x:IsA'HHat' then x:destroy'' end end
  222. for i,x in pairs(chr:GetChildren()) do
  223. for a,v in pairs(x:GetChildren()) do
  224. if v:IsA'CharacterMesh' then v:destroy''
  225. end
  226. end
  227. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement