Advertisement
PierceTheCakeKeeper

Magic school bus FE READ

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