Advertisement
xxtheadmincreatorxx

Baldi test

Mar 25th, 2019
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.26 KB | None | 0 0
  1. -- This script has convert to FE by xxtheadmincreatorxx
  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,game,owner = owner,game
  6. local RealPlayer = Player
  7. do
  8. print("Now everyone can see what you see!")
  9. local rp = RealPlayer
  10. script.Parent = rp.Character
  11.  
  12. --RemoteEvent for communicating
  13. local Event = Instance.new("RemoteEvent")
  14. Event.Name = "UserInput_Event"
  15.  
  16. --Fake event to make stuff like Mouse.KeyDown work
  17. local function fakeEvent()
  18. local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
  19. t.connect = t.Connect
  20. return t
  21. end
  22.  
  23. --Creating fake input objects with fake variables
  24. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  25. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  26. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  27. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  28. end}
  29. --Merged 2 functions into one by checking amount of arguments
  30. CAS.UnbindAction = CAS.BindAction
  31.  
  32. --This function will trigger the events that have been :Connect()'ed
  33. local function te(self,ev,...)
  34. local t = m[ev]
  35. if t and t._fakeEvent then
  36. for _,f in pairs(t.Functions) do
  37. f(...)
  38. end
  39. end
  40. end
  41. m.TrigEvent = te
  42. UIS.TrigEvent = te
  43.  
  44. Event.OnServerEvent:Connect(function(plr,io)
  45. if plr~=rp then return end
  46. m.Target = io.Target
  47. m.Hit = io.Hit
  48. if not io.isMouse then
  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 Mouse = Player:GetMouse()
  69. local UIS = game:GetService("UserInputService")
  70. local input = function(io,a)
  71. if a then return end
  72. --Since InputObject is a client-side instance, we create and pass table instead
  73. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  74. end
  75. UIS.InputBegan:Connect(input)
  76. UIS.InputEnded:Connect(input)
  77.  
  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.  
  88. ----Sandboxed game object that allows the usage of client-side methods and services
  89. --Real game object
  90. local _rg = game
  91.  
  92. --Metatable for fake service
  93. local fsmt = {
  94. __index = function(self,k)
  95. local s = rawget(self,"_RealService")
  96. if s then return s[k] end
  97. end,
  98. __newindex = function(self,k,v)
  99. local s = rawget(self,"_RealService")
  100. if s then s[k]=v end
  101. end,
  102. __call = function(self,...)
  103. local s = rawget(self,"_RealService")
  104. if s then return s(...) end
  105. end
  106. }
  107. local function FakeService(t,RealService)
  108. t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  109. return setmetatable(t,fsmt)
  110. end
  111.  
  112. --Fake game object
  113. local g = {
  114. GetService = function(self,s)
  115. return self[s]
  116. end,
  117. Players = FakeService({
  118. LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  119. },"Players"),
  120. UserInputService = FakeService(UIS,"UserInputService"),
  121. ContextActionService = FakeService(CAS,"ContextActionService"),
  122. }
  123. rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  124. g.service = g.GetService
  125.  
  126. g.RunService = FakeService({
  127. RenderStepped = _rg:GetService("RunService").Heartbeat,
  128. BindToRenderStep = function(self,name,_,fun)
  129.  
  130. end,
  131. UnbindFromRenderStep = function(self,name)
  132. self._btrs[name]:Disconnect()
  133. end,
  134. },"RunService")
  135.  
  136. setmetatable(g,{
  137. __index=function(self,s)
  138. return _rg:GetService(s) or typeof(_rg[s])=="function"
  139. and function(_,...)return _rg[s](_rg,...)end or _rg[s]
  140. end,
  141. __newindex = fsmt.__newindex,
  142. __call = fsmt.__call
  143. })
  144. --Changing owner to fake player object to support owner:GetMouse()
  145. game,owner = g,g.Players.LocalPlayer
  146. end
  147.  
  148. plr = game.Players.LocalPlayer
  149. repeat wait() until plr.Character
  150. char = plr.Character
  151.  
  152. for i,v in pairs(char:GetChildren()) do
  153. if v.ClassName == "Part" then
  154. v.Transparency = 1
  155. elseif v.ClassName == "Accessory" then
  156. v.Handle.Transparency = 1
  157. end
  158. end
  159. char.Animate:Destroy()
  160. char.Humanoid.Animator:Destroy()
  161. local bill = Instance.new("BillboardGui",char.Head)
  162. bill.Name = "BaldiDisplay"
  163. bill.Adornee = bill.Parent
  164. bill.Size = UDim2.new(6, 0 , 7, 0)
  165. bill.Archivable = true
  166. bill.AutoLocalize = true
  167. local img = Instance.new("ImageLabel",bill)
  168. img.Size = UDim2.new(0.75, 0 , 1.5, 0)
  169. img.Image = "http://www.roblox.com/asset/?id=1983371401"
  170. img.Visible = true
  171. img.BackgroundTransparency = 1
  172. img.Position = UDim2.new(0.213, 0 , 0, 0)
  173. char.Humanoid.HipHeight = 2.1
  174. char.Humanoid.Name = "Baldi"
  175. Slap = Instance.new("Sound",char.Head)
  176. Slap.SoundId = "rbxassetid://1909185477"
  177. Slap.Volume = 10
  178. HEHEHEH = Instance.new("Sound",char)
  179. HEHEHEH.SoundId = "rbxassetid://2021702927"
  180. HEHEHEH.Volume = 4
  181. Screech = Instance.new("Sound",char.Head)
  182. Screech.SoundId = "rbxassetid://1784592449"
  183. Screech.Volume = 10
  184. GETOUTWHILEYOUSTILLCAN = Instance.new("Sound",char)
  185. GETOUTWHILEYOUSTILLCAN.SoundId = "rbxassetid://1846448410"
  186. GETOUTWHILEYOUSTILLCAN:Play()
  187. GETOUTWHILEYOUSTILLCAN.Volume = 4
  188. JumpCount = 0
  189. char.Head.face.Transparency = 1
  190. char.Baldi.MaxHealth = 0
  191. touched = false
  192. char.Torso.Touched:connect(function(part)
  193. local human = part.Parent:FindFirstChildOfClass("Humanoid")
  194. if human and human.Parent.Name ~= char.Name and touched == false then
  195. human.Health = 0
  196. Screech:Play()
  197. touched = true
  198. wait(0.9)
  199. if JumpCount == 0 and human.Jump then
  200. JumpCount = 1
  201. else
  202. touched = false
  203. JumpCount = 0
  204. end
  205. wait(1)
  206. if JumpCount == 1 and human.Jump then
  207. JumpCount = 2
  208. else
  209. JumpCount = 0
  210. end
  211. wait(1)
  212. if JumpCount == 2 and human.Jump then
  213. JumpCount = 3
  214. else
  215. JumpCount = 0
  216. end
  217. wait(1)
  218. if JumpCount == 3 and human.Jump then
  219. JumpCount = 4
  220. else
  221. JumpCount = 0
  222. end
  223. wait(1)
  224. if JumpCount == 4 and human.Jump then
  225. JumpCount = 0
  226. wait(1)
  227. touched = false
  228. char.Baldi.Walkspeed = 16
  229. human.WalkSpeed = 16
  230. else
  231. JumpCount = 0
  232. end
  233. end
  234. end)
  235. while true do
  236. wait()
  237. img.Image = "http://www.roblox.com/asset/?id=1983155193"
  238. char.Baldi.WalkSpeed = 100
  239. Slap:Play()
  240. wait(0.10)
  241. img.Image = "http://www.roblox.com/asset/?id=1983154100"
  242. wait(0.05)
  243. img.Image = "http://www.roblox.com/asset/?id=1983152544"
  244. wait(0.05)
  245. img.Image = "http://www.roblox.com/asset/?id=1983150889"
  246. wait(0.05)
  247. img.Image = "http://www.roblox.com/asset/?id=1983371401"
  248. char.Baldi.WalkSpeed = 0
  249. wait(0.60)
  250. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement