Advertisement
lucaamaco

Untitled

Sep 28th, 2019
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.47 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,Mouse,mouse,UserInputService,ContextActionService = owner
  4. local RealPlayer = Player
  5. do print("FE Compatibility code by lucaamaco4")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},Soundscape=r:GetService("RunService").Heartbeat,BindToSoundscape=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer end
  6. --{{Made by Strazos}}--
  7.  
  8. local p = game.Players.LocalPlayer
  9. local char = p.Character
  10. local larm = char["Left Arm"]
  11. local rarm = char["Right Arm"]
  12. local lleg = char["Left Leg"]
  13. local rleg = char["Right Leg"]
  14. local hed = char.Head
  15. local torso = char.Torso
  16. local hum = char.Humanoid
  17. local weld = Instance.new("Weld",torso)
  18. weld.Part0 = torso
  19.  
  20. larm.Transparency = 1
  21. rarm.Transparency = 1
  22. lleg.Transparency = 1
  23. rleg.Transparency = 1
  24. hed.Transparency = 1
  25. torso.Transparency = 1
  26.  
  27.  
  28. local train = Instance.new("Part",torso)
  29. train.Anchored = true
  30. train.CanCollide = false
  31. train.Size = Vector3.new(1,1,1)
  32. train.CustomPhysicalProperties = PhysicalProperties.new(0,0,0,0,0)
  33. weld.Part1 = train
  34. weld.C1 = CFrame.new(0,-3,0) * CFrame.Angles(0,math.rad(180),0)
  35. train.Anchored = false
  36. local TrainMesh = Instance.new("SpecialMesh",train)
  37. TrainMesh.MeshType = Enum.MeshType.FileMesh
  38. TrainMesh.Scale = Vector3.new(3,3,3)
  39. TrainMesh.MeshId = "rbxassetid://471480829"
  40. TrainMesh.TextureId = "rbxassetid://471480833"
  41.  
  42.  
  43. hum.WalkSpeed = 120;
  44.  
  45.  
  46. for i,v in pairs(char:GetChildren()) do
  47. if v:IsA("Part") then
  48. v.Transparency = 1;
  49. elseif v:IsA("Hat") then
  50. v:Destroy()
  51. elseif v:IsA("Model") then
  52. v:Destroy()
  53. end
  54. end
  55.  
  56.  
  57. local function SFX(id) local s=Instance.new("Sound",torso); s.SoundId = "rbxassetid://"..id; s.Volume = 64364643643; return s; end
  58. train.Touched:connect(function(p)
  59. if p.Parent then
  60. if p.Parent:IsA("Model") then
  61. if game.Players:FindFirstChild(p.Parent.Name) then
  62. if p.Parent.Name ~= game.Players.LocalPlayer.Name then
  63. game.Players:FindFirstChild(p.Parent.Name).Character:BreakJoints()
  64. local Whistle = SFX(154365429)
  65. Whistle:Play()
  66. end
  67. end
  68. end
  69. end
  70. end)
  71.  
  72. local Music = SFX(468775372)
  73. Music.Looped = true;
  74. wait(1)
  75. Music:Play();
  76.  
  77.  
  78. local particleemitter = Instance.new("ParticleEmitter", torso)
  79. particleemitter.Texture = "http://www.roblox.com/asset/?id=243088609"
  80. particleemitter.Lifetime = NumberRange.new(4)
  81. particleemitter.Speed = NumberRange.new(10)
  82. particleemitter.Size = NumberSequence.new({NumberSequenceKeypoint.new(0, 1), NumberSequenceKeypoint.new(1, 2)})
  83. particleemitter.RotSpeed = NumberRange.new(-55, 55)
  84. particleemitter.Rate = 80
  85. particleemitter.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0, 0.7), NumberSequenceKeypoint.new(0.9, 1), NumberSequenceKeypoint.new(1, 1)})
  86. particleemitter.LightEmission = 0
  87. particleemitter.EmissionDirection = "Back"
  88. particleemitter.Color = ColorSequence.new(Color3.new(255,255,255), Color3.new(255,255,255)) --Color here
  89. -------------------------------------------------
  90. --rgb function by Strazos--
  91.  
  92. function HSLtoRGB(hue, sat, light)
  93. local c = light > .5 and (2 - 2 * light) * sat or (2 * light) * sat
  94. local h2 = hue / 60
  95. local x = c * (1 - math.abs((h2 % 2) - 1))
  96. local rgbvals = {{c, x, 0}, {x, c, 0}, {0, c, x}, {0, x, c}, {x, 0, c}, {c, 0, x}}
  97. local rgb = rgbvals[math.floor(h2) + 1]
  98. for i = 1, 3 do rgb[i] = rgb[i] + (light - .5 * c) end
  99. return Color3.new(rgb[1], rgb[2], rgb[3])
  100. end
  101.  
  102. local torso = script.Parent
  103.  
  104. spawn(function()
  105. while wait() do
  106. for i = 1,150 do
  107. wait()
  108. 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)
  109. end
  110. local reversei = 150
  111. for i = 1,150 do
  112. wait()
  113. 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)
  114. reversei = reversei-1
  115. end
  116. end
  117. end)
  118.  
  119. ---------------------------------------------------
  120. local plr = game.Players.LocalPlayer
  121. local chr = plr.Character
  122. local maus = plr:GetMouse()
  123. local PGui=plr.PlayerGui
  124. local lleg = chr["Left Leg"]
  125. local rleg = chr["Right Leg"]
  126. local larm = chr["Left Arm"]
  127. local rarm = chr["Right Arm"]
  128. local hed = chr.Head
  129. local rutprt = chr.HumanoidRootPart
  130. local torso = chr.Torso
  131. local pseudohead=hed:Clone()
  132. for i,x in pairs(pseudohead:GetChildren()) do if not x.ClassName:find('Mesh') then x:Destroy() end end
  133. pseudohead.Name='PseudoHead'
  134. pseudohead.Parent=chr.Head
  135. local pseudoweld=Instance.new('Weld',torso)
  136. pseudoweld.Part0=hed
  137. pseudoweld.Name='PseudoHeadWeld'
  138. pseudoweld.Part1=pseudohead
  139. hed.Transparency=1
  140. for i,x in pairs(chr:GetChildren()) do
  141. if x:IsA'HHat' then x:destroy'' end end
  142. for i,x in pairs(chr:GetChildren()) do
  143. for a,v in pairs(x:GetChildren()) do
  144. if v:IsA'CharacterMesh' then v:destroy''
  145. end
  146. end
  147. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement