Zomething

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

Mar 11th, 2021
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.98 KB | None | 0 0
  1. wait(1)
  2. local Player = game:GetService("Players"):WaitForChild('jesseanwa08')
  3. local Mouse,mouse,UserInputService,ContextActionService
  4. local camcf = CFrame.new()
  5. do
  6. local CAS = {Actions={}}
  7. local Event = Instance.new("RemoteEvent")
  8. Event.Name = Player.UserId
  9. Event.Parent = workspace:FindFirstChildOfClass'Terrain'
  10. local fakeEvent = function()
  11. local t = {_fakeEvent=true}
  12. t.Connect = function(self,f)self.Function=f end
  13. t.connect = t.Connect
  14. return t
  15. end
  16. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  17. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  18. function CAS:BindAction(name,fun,touch,...)
  19. CAS.Actions[name] = {Name=name,Function=fun,Keys={...}}
  20. end
  21. function CAS:UnbindAction(name)
  22. CAS.Actions[name] = nil
  23. end
  24. local function te(self,ev,...)
  25. local t = m[ev]
  26. if t and t._fakeEvent and t.Function then
  27. t.Function(...)
  28. end
  29. end
  30. m.TrigEvent = te
  31. UIS.TrigEvent = te
  32. Event.OnServerEvent:Connect(function(plr,io,type,value)
  33. if plr~=Player then return end
  34. if type == 1 or type == nil then
  35. if io.isMouse then
  36. m.Target = io.Target
  37. m.Hit = io.Hit
  38. elseif io.UserInputType == Enum.UserInputType.MouseButton1 then
  39. if io.UserInputState == Enum.UserInputState.Begin then
  40. m:TrigEvent("Button1Down")
  41. else
  42. m:TrigEvent("Button1Up")
  43. end
  44. else
  45. for n,t in pairs(CAS.Actions) do
  46. for _,k in pairs(t.Keys) do
  47. if k==io.KeyCode then
  48. t.Function(t.Name,io.UserInputState,io)
  49. end
  50. end
  51. end
  52. if io.UserInputState == Enum.UserInputState.Begin then
  53. m:TrigEvent("KeyDown",io.KeyCode.Name:lower())
  54. UIS:TrigEvent("InputBegan",io,false)
  55. else
  56. m:TrigEvent("KeyUp",io.KeyCode.Name:lower())
  57. UIS:TrigEvent("InputEnded",io,false)
  58. end
  59. end
  60. elseif type == 2 then
  61. camcf = value
  62. end
  63. end)
  64. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  65. workspace:FindFirstChildOfClass'Terrain'.ChildRemoved:Connect(function(ch)
  66. if ch.Name == Player.UserId then
  67. Event = Instance.new("RemoteEvent")
  68. Event.Name = Player.UserId
  69. Event.Parent = workspace:FindFirstChildOfClass('Terrain')
  70. Event.OnServerEvent:Connect(function(plr,io,type,value)
  71. if plr~=Player then return end
  72. if type == 1 or type == nil then
  73. if io.isMouse then
  74. m.Target = io.Target
  75. m.Hit = io.Hit
  76. elseif io.UserInputType == Enum.UserInputType.MouseButton1 then
  77. if io.UserInputState == Enum.UserInputState.Begin then
  78. m:TrigEvent("Button1Down")
  79. else
  80. m:TrigEvent("Button1Up")
  81. end
  82. else
  83. for n,t in pairs(CAS.Actions) do
  84. for _,k in pairs(t.Keys) do
  85. if k==io.KeyCode then
  86. t.Function(t.Name,io.UserInputState,io)
  87. end
  88. end
  89. end
  90. if io.UserInputState == Enum.UserInputState.Begin then
  91. m:TrigEvent("KeyDown",io.KeyCode.Name:lower())
  92. UIS:TrigEvent("InputBegan",io,false)
  93. else
  94. m:TrigEvent("KeyUp",io.KeyCode.Name:lower())
  95. UIS:TrigEvent("InputEnded",io,false)
  96. end
  97. end
  98. elseif type == 2 then
  99. camcf = value
  100. end
  101. end)
  102. end
  103. end)
  104. end
  105. wait(2)
  106. script.Parent = nil
  107. function addatt(prt)
  108. if script:FindFirstChild(prt.Name) then
  109. local p = script:FindFirstChild(prt.Name)
  110. if p then
  111. for i,v in pairs(p:children()) do
  112. v:Clone().Parent = prt
  113. end
  114. end
  115. end
  116. end
  117. local character = Instance.new("Model")
  118. local la = Instance.new("FlagStand")
  119. local ra = Instance.new("FlagStand")
  120. local ll = Instance.new("FlagStand")
  121. local rl = Instance.new("FlagStand")
  122. local hd = Instance.new("FlagStand")
  123. local tr = Instance.new("FlagStand")
  124. local hum = Instance.new("Humanoid")
  125. local hrp = Instance.new("FlagStand")
  126. local face = Instance.new("Decal")
  127. local inpcl = script:WaitForChild("LocalScript"):Clone()
  128. game:GetService("Debris"):AddItem(script:WaitForChild("LocalScript"),0)
  129. local inpo = inpcl:Clone()
  130. function ream(are)
  131. if are:FindFirstChild'Char' then
  132. local value = are:FindFirstChild'Char'
  133. value.Value = hd
  134. end
  135. end
  136. face.Parent = hd
  137. face.Texture = "rbxasset://textures/face.png"
  138. local msh = Instance.new("SpecialMesh")
  139. msh.Scale = Vector3.new(1.25,1.25,1.25)
  140. msh.Parent = hd
  141. hum.Parent = character
  142. hum.HealthDisplayType = Enum.HumanoidHealthDisplayType.AlwaysOff
  143. character.Parent = workspace:FindFirstChildOfClass("Terrain")
  144. hrp.Anchored = true
  145. hrp.Size = Vector3.new(2,2,1)
  146. hrp.Name = "HumanoidRootPart"
  147. hrp.Parent = character
  148. hrp.Transparency = 1
  149. la.Anchored = true
  150. ra.Anchored = true
  151. ll.Anchored = true
  152. rl.Anchored = true
  153. hd.Anchored = true
  154. tr.Anchored = true
  155. la.Name = "Left Arm"
  156. ra.Name = "Right Arm"
  157. ll.Name = "Left Leg"
  158. rl.Name = "Right Leg"
  159. tr.Name = "Torso"
  160. hd.Name = "Head"
  161. la.Size = Vector3.new(1,2,1)
  162. ra.Size = Vector3.new(1,2,1)
  163. ll.Size = Vector3.new(1,2,1)
  164. rl.Size = Vector3.new(1,2,1)
  165. hd.Size = Vector3.new(2,1,1)
  166. tr.Size = Vector3.new(2,2,1)
  167. la.Parent = character
  168. ra.Parent = character
  169. ll.Parent = character
  170. rl.Parent = character
  171. hd.Parent = character
  172. tr.Parent = character
  173. addatt(la)
  174. addatt(ra)
  175. addatt(ll)
  176. addatt(rl)
  177. addatt(tr)
  178. addatt(hd)
  179. addatt(hrp)
  180. local lacf= CFrame.new(-1.5,0,0)
  181. local racf = CFrame.new(1.5,0,0)
  182. local llcf = CFrame.new(-.5,-2,0)
  183. local rlcf = CFrame.new(.5,-2,0)
  184. local hdcf = CFrame.new(0,1.5,0)
  185. local trcf = CFrame.new(0,0,0)*CFrame.Angles(0,math.rad(180),0)
  186. local posy = CFrame.new(0,8,0)
  187. local move = CFrame.new()
  188. local fsp = 0
  189. function ay(h,a)
  190. trcf = trcf:lerp(h[1],(tonumber(a) or .3))
  191. hdcf = hdcf:lerp(h[2],(tonumber(a) or .3))
  192. lacf = lacf:lerp(h[3],(tonumber(a) or .3))
  193. racf = racf:lerp(h[4],(tonumber(a) or .3))
  194. llcf = llcf:lerp(h[5],(tonumber(a) or .3))
  195. rlcf = rlcf:lerp(h[6],(tonumber(a) or .3))
  196. end
  197. local r = Instance.new("BindableEvent")
  198. r.Parent = script
  199. local remdel
  200. function remove()
  201. remdel:Disconnect()
  202. remdel = nil
  203. game:GetService("Debris"):AddItem(character,0)
  204. end
  205. remdel = character.ChildRemoved:Connect(remove)
  206. function recreate()
  207. character = Instance.new("Model")
  208. la = Instance.new("FlagStand")
  209. ra = Instance.new("FlagStand")
  210. ll = Instance.new("FlagStand")
  211. rl = Instance.new("FlagStand")
  212. hd = Instance.new("FlagStand")
  213. tr = Instance.new("FlagStand")
  214. hum = Instance.new("Humanoid")
  215. hrp = Instance.new("FlagStand")
  216. face = Instance.new("Decal")
  217. face.Parent = hd
  218. face.Texture = "rbxasset://textures/face.png"
  219. msh = Instance.new("SpecialMesh")
  220. msh.Scale = Vector3.new(1.25,1.25,1.25)
  221. msh.Parent = hd
  222. hum.Parent = character
  223. hum.HealthDisplayType = Enum.HumanoidHealthDisplayType.AlwaysOff
  224. character.Parent = workspace:FindFirstChildOfClass("Terrain")
  225. hrp.Anchored = true
  226. hrp.Size = Vector3.new(2,2,1)
  227. hrp.Name = "HumanoidRootPart"
  228. hrp.Parent = character
  229. hrp.Transparency = 1
  230. la.Anchored = true
  231. ra.Anchored = true
  232. ll.Anchored = true
  233. rl.Anchored = true
  234. hd.Anchored = true
  235. tr.Anchored = true
  236. la.Name = "Left Arm"
  237. ra.Name = "Right Arm"
  238. ll.Name = "Left Leg"
  239. rl.Name = "Right Leg"
  240. tr.Name = "Torso"
  241. hd.Name = "Head"
  242. la.Size = Vector3.new(1,2,1)
  243. ra.Size = Vector3.new(1,2,1)
  244. ll.Size = Vector3.new(1,2,1)
  245. rl.Size = Vector3.new(1,2,1)
  246. hd.Size = Vector3.new(2,1,1)
  247. tr.Size = Vector3.new(2,2,1)
  248. la.Parent = character
  249. ra.Parent = character
  250. ll.Parent = character
  251. rl.Parent = character
  252. hd.Parent = character
  253. tr.Parent = character
  254. addatt(la)
  255. addatt(ra)
  256. addatt(ll)
  257. addatt(rl)
  258. addatt(tr)
  259. addatt(hd)
  260. addatt(hrp)
  261. remdel = character.ChildRemoved:Connect(remove)
  262. end
  263. function sw(n)
  264. n = tonumber(n)
  265. if n then
  266. for i = 0,n,.1 do
  267. r.Event:wait()
  268. end
  269. else
  270. r.Event:wait()
  271. end
  272. end
  273. speed = 2
  274. w,s,a,d = false,false,false,false
  275. mouse.KeyDown:Connect(function(key)
  276. if key == 'w' then
  277. w = true
  278. end
  279. if key == 's' then
  280. s = true
  281. end
  282. if key == 'a' then
  283. a = true
  284. end
  285. if key == 'd' then
  286. d = true
  287. end
  288. end)
  289. mouse.KeyUp:Connect(function(key)
  290. if key == 'w' then
  291. w = false
  292. end
  293. if key == 's' then
  294. s = false
  295. end
  296. if key == 'a' then
  297. a = false
  298. end
  299. if key == 'd' then
  300. d = false
  301. end
  302. end)
  303. function checkchar()
  304. if character.Parent ~= workspace:FindFirstChildOfClass('Terrain') then
  305. local success,detail = pcall(function()
  306. character.Parent = workspace:FindFirstChildOfClass('Terrain')
  307. end)
  308. if not success then
  309. recreate()
  310. end
  311. end
  312. end
  313. inpo.Parent = Player.PlayerGui
  314. inpo.Disabled = false
  315. ream(inpo)
  316. game:GetService("RunService").Heartbeat:Connect(function()
  317.  
  318. checkchar()
  319. if Player.PlayerGui:FindFirstChild'LocalScript' == nil then
  320. inpo = inpcl:clone()
  321. inpo.Parent = Player.PlayerGui
  322. inpo.Disabled = false
  323. end
  324. tr.CFrame = posy * trcf
  325. la.CFrame = tr.CFrame * lacf
  326. ra.CFrame = tr.CFrame * racf
  327. ll.CFrame = tr.CFrame * llcf
  328. rl.CFrame = tr.CFrame * rlcf
  329. hd.CFrame = tr.CFrame * hdcf
  330. hrp.CFrame = posy
  331. local ray = Ray.new(posy.p,CFrame.new(0,-1,0).p.unit*4)
  332. local pos,hit = workspace:FindPartOnRayWithIgnoreList(ray,{character})
  333. if pos then
  334. fsp = 0
  335. posy = posy * CFrame.new(0,hit.y-posy.y+3,0)
  336. else
  337. fsp = fsp + .06
  338. posy = posy - Vector3.new(0,fsp,0)
  339. end
  340. if w or s or a or d then
  341. posy = CFrame.new(posy.Position,Vector3.new(camcf.X,posy.Y,camcf.Z))
  342. end
  343. local oldp = posy
  344. if w then
  345. posy = posy * CFrame.new(0,0,-speed)
  346. end
  347. if s then
  348. posy = posy * CFrame.new(0,0,speed)
  349. end
  350. if a then
  351. posy = posy * CFrame.new(-speed,0,0)
  352. end
  353. if d then
  354. posy = posy * CFrame.new(speed,0,0)
  355. end
  356. if posy.X ~= oldp.X or posy.Z ~= oldp.Z then
  357. posy = CFrame.new(posy.Position,oldp.Position)
  358. end
  359.  
  360. if Player.Character then
  361. game:GetService("Debris"):AddItem(Player.Character,0)
  362. end
  363. ream(inpo)
  364. end)
  365. game:GetService("RunService").Stepped:Connect(function()
  366. tr.CFrame = posy * trcf
  367. la.CFrame = tr.CFrame * lacf
  368. ra.CFrame = tr.CFrame * racf
  369. ll.CFrame = tr.CFrame * llcf
  370. rl.CFrame = tr.CFrame * rlcf
  371. hd.CFrame = tr.CFrame * hdcf
  372. hrp.CFrame = posy
  373. r:Fire()
  374. if Player.Character then
  375. game:GetService("Debris"):AddItem(Player.Character,0)
  376. end
  377. ream(inpo)
  378. end)
Add Comment
Please, Sign In to add comment