Advertisement
Dark_AJ1

bat

Jan 6th, 2019
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 24.29 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,game,owner = owner,game
  4. local RealPlayer = Player
  5. do
  6. print("FE Compatibility code by Mokiros")
  7. local rp = RealPlayer
  8. script.Parent = rp.Character
  9.  
  10. --RemoteEvent for communicating
  11. local Event = Instance.new("RemoteEvent")
  12. Event.Name = "UserInput_Event"
  13.  
  14. --Fake event to make stuff like Mouse.KeyDown work
  15. local function fakeEvent()
  16. local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
  17. t.connect = t.Connect
  18. return t
  19. end
  20.  
  21. --Creating fake input objects with fake variables
  22. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
  23. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  24. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  25. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  26. end}
  27. --Merged 2 functions into one by checking amount of arguments
  28. CAS.UnbindAction = CAS.BindAction
  29.  
  30. --This function will trigger the events that have been :Connect()'ed
  31. local function te(self,ev,...)
  32. local t = m[ev]
  33. if t and t._fakeEvent then
  34. for _,f in pairs(t.Functions) do
  35. f(...)
  36. end
  37. end
  38. end
  39. m.TrigEvent = te
  40. UIS.TrigEvent = te
  41.  
  42. Event.OnServerEvent:Connect(function(plr,io)
  43. if plr~=rp then return end
  44. m.Target = io.Target
  45. m.Hit = io.Hit
  46. if not io.isMouse then
  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. if io.UserInputType == Enum.UserInputType.MouseButton2 then
  52. return m:TrigEvent(b and "Button2Down" or "Button2Up")
  53. end
  54. for _,t in pairs(CAS.Actions) do
  55. for _,k in pairs(t.Keys) do
  56. if k==io.KeyCode then
  57. t.Function(t.Name,io.UserInputState,io)
  58. end
  59. end
  60. end
  61. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  62. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  63. end
  64. end)
  65. Event.Parent = NLS([==[
  66. local Player = game:GetService("Players").LocalPlayer
  67. local Event = script:WaitForChild("UserInput_Event")
  68.  
  69. local Mouse = Player:GetMouse()
  70. local UIS = game:GetService("UserInputService")
  71. local input = function(io,a)
  72. if a then return end
  73. --Since InputObject is a client-side instance, we create and pass table instead
  74. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  75. end
  76. UIS.InputBegan:Connect(input)
  77. UIS.InputEnded:Connect(input)
  78.  
  79. local h,t
  80. --Give the server mouse data 30 times every second, but only if the values changed
  81. --If player is not moving their mouse, client won't fire events
  82. while wait(1/30) do
  83. if h~=Mouse.Hit or t~=Mouse.Target then
  84. h,t=Mouse.Hit,Mouse.Target
  85. Event:FireServer({isMouse=true,Target=t,Hit=h})
  86. end
  87. end]==],Player.Character)
  88.  
  89. ----Sandboxed game object that allows the usage of client-side methods and services
  90. --Real game object
  91. local _rg = game
  92.  
  93. --Metatable for fake service
  94. local fsmt = {
  95. __index = function(self,k)
  96. local s = rawget(self,"_RealService")
  97. if s then
  98. return typeof(s[k])=="function"
  99. and function(_,...)return s[k](s,...)end or s[k]
  100. end
  101. end,
  102. __newindex = function(self,k,v)
  103. local s = rawget(self,"_RealService")
  104. if s then s[k]=v 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 rawget(self,s) or _rg:GetService(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. RunService = FakeService({
  123. _btrs = {},
  124. RenderStepped = _rg:GetService("RunService").Heartbeat,
  125. BindToRenderStep = function(self,name,_,fun)
  126. self._btrs[name] = self.Heartbeat:Connect(fun)
  127. end,
  128. UnbindFromRenderStep = function(self,name)
  129. self._btrs[name]:Disconnect()
  130. end,
  131. },"RunService")
  132. }
  133. rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  134. g.service = g.GetService
  135. FakeService(g,game)
  136. --Changing owner to fake player object to support owner:GetMouse()
  137. game,owner = g,g.Players.LocalPlayer
  138. end
  139. --MADE BY RUFUS14
  140. mouse = game.Players.LocalPlayer:GetMouse()
  141. using = false
  142. hit = false
  143. bat = Instance.new("Part", game.Players.LocalPlayer.Character)
  144. bat.Size = Vector3.new(1, 1, 5)
  145. bat.CanCollide = false
  146. bat:BreakJoints()
  147. baseballhit = Instance.new("Sound", bat)
  148. baseballhit.Volume = 10
  149. baseballhit.SoundId = "rbxassetid://175024455"
  150. baseballhit1 = Instance.new("Sound", game.Players.LocalPlayer.Character.Head)
  151. baseballhit1.Volume = 20
  152. baseballhit1.SoundId = "rbxassetid://0"
  153. swinging = Instance.new("Sound", bat)
  154. swinging.Volume = 10
  155. swinging.PlaybackSpeed = 1.2
  156. swinging.SoundId = "rbxassetid://147722227"
  157. weld = Instance.new("Weld", bat)
  158. weld.Part0 = game.Players.LocalPlayer.Character["Right Arm"]
  159. weld.Part1 = bat
  160. local batcritical = Instance.new("Sound", bat)
  161. batcritical.SoundId = "rbxassetid://296102734"
  162. batcritical.Volume = 5
  163. weld.C0 = weld.C0 * CFrame.Angles(0,3.15,0) * CFrame.new(0,-0.95,1.9)
  164. print(weld.C0)
  165. mesh = Instance.new("SpecialMesh", bat)
  166. mesh.MeshId = "http://www.roblox.com/asset/?id=54983181"
  167. mesh.TextureId = "http://www.roblox.com/asset/?id=54983107"
  168. mesh.Scale = Vector3.new(2,2,2)
  169. local rhandweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
  170. rhandweld.Part0 = game.Players.LocalPlayer.Character.Torso
  171. rhandweld.Part1 = game.Players.LocalPlayer.Character["Right Arm"]
  172. rhandweld.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  173. rhandweld.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  174. local lhandweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
  175. lhandweld.Part0 = game.Players.LocalPlayer.Character.Torso
  176. lhandweld.Part1 = game.Players.LocalPlayer.Character["Left Arm"]
  177. lhandweld.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  178. lhandweld.C1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  179. function hit()
  180. if not using then
  181. using = true
  182. for i = 0,1 , 0.1 do
  183. wait()
  184. game.Players.LocalPlayer.Character.Torso.Neck.C0 = game.Players.LocalPlayer.Character.Torso.Neck.C0 * CFrame.new():lerp(CFrame.Angles(0,0,-0.35),i)
  185. game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 = game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 * CFrame.new():lerp(CFrame.Angles(0,0,0.35),i)
  186. rhandweld.C0 = rhandweld.C0 * CFrame.new():lerp(CFrame.Angles(0,0,0.3),i)
  187. lhandweld.C0 = lhandweld.C0 * CFrame.new():lerp(CFrame.Angles(-0.15,0,0),i)
  188. end
  189. for i = 1,2 do
  190. wait()
  191. game.Players.LocalPlayer.Character.Torso.Neck.C0 = game.Players.LocalPlayer.Character.Torso.Neck.C0 * CFrame.Angles(0,0,-0.1)
  192. game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 = game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 * CFrame.Angles(0,0,0.1)
  193. rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0,0,0.1)
  194. lhandweld.C0 = lhandweld.C0 * CFrame.Angles(-0.05,0,0)
  195. end
  196. wait(0.2)
  197. swinging:Play()
  198. local se = Instance.new("Part", bat)
  199. se.Size = Vector3.new(1, 1, 3)
  200. se:BreakJoints()
  201. se.Transparency = 1
  202. se.CanCollide = false
  203. local dmgweld = Instance.new("Weld", se)
  204. dmgweld.Part0 = bat
  205. dmgweld.Part1 = se
  206. dmgweld.C0 = dmgweld.C0 * CFrame.new(0,0,1)
  207. local function dmg(part)
  208. local hum = part.Parent:findFirstChild("Humanoid")
  209. if hum ~= nil then
  210. se:destroy()
  211. baseballhit:Play()
  212. baseballhit1:Play()
  213. hum.Health = hum.Health - math.random(25,35)
  214. hum.PlatformStand = true
  215. local tor = part.Parent:findFirstChild("Torso")
  216. local dmgmat = math.random(1,4)
  217. if dmgmat == 3 then
  218. batcritical:Play()
  219. hum.Health = hum.Health - math.random(98,135)
  220. end
  221. if tor then
  222. tor.RotVelocity = game.Players.LocalPlayer.Character.Torso.CFrame.rightVector * 34
  223. tor.Velocity = game.Players.LocalPlayer.Character.Torso.CFrame.rightVector * 34
  224. end
  225. wait(2)
  226. hum.PlatformStand = false
  227. hit = false
  228. end
  229. end
  230. se.Touched:connect(dmg)
  231. for i = 0,1 , 0.2 do
  232. wait()
  233. game.Players.LocalPlayer.Character.Torso.Neck.C0 = game.Players.LocalPlayer.Character.Torso.Neck.C0 * CFrame.new():lerp(CFrame.Angles(0,0,0.7),i)
  234. game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 = game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 * CFrame.new():lerp(CFrame.Angles(0,0,-0.70),i)
  235. rhandweld.C0 = rhandweld.C0 * CFrame.new():lerp(CFrame.Angles(0,0,-0.6),i)
  236. lhandweld.C0 = lhandweld.C0 * CFrame.new():lerp(CFrame.Angles(0.30,0,0),i)
  237. end
  238. for i = 1,2 do
  239. wait()
  240. game.Players.LocalPlayer.Character.Torso.Neck.C0 = game.Players.LocalPlayer.Character.Torso.Neck.C0 * CFrame.Angles(0,0,-0.1)
  241. game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 = game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 * CFrame.Angles(0,0,-0.3)
  242. rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0,0,-0.4)
  243. end
  244. for i = 1,2 do
  245. wait()
  246. game.Players.LocalPlayer.Character.Torso.Neck.C0 = game.Players.LocalPlayer.Character.Torso.Neck.C0 * CFrame.Angles(0,0,-0.05)
  247. game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 = game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 * CFrame.Angles(0,0,-0.05)
  248. rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0,0,-0.2)
  249. end
  250. wait(0.2)
  251. for i = 1,2 do
  252. wait()
  253. game.Players.LocalPlayer.Character.Torso.Neck.C0 = game.Players.LocalPlayer.Character.Torso.Neck.C0 * CFrame.Angles(0,0,0.05)
  254. game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 = game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 * CFrame.Angles(0,0,-0.05)
  255. rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0,0,0.2)
  256. end
  257. for i = 1,2 do
  258. wait()
  259. game.Players.LocalPlayer.Character.Torso.Neck.C0 = game.Players.LocalPlayer.Character.Torso.Neck.C0 * CFrame.Angles(0,0,0.06)
  260. game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 = game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 * CFrame.Angles(0,0,0.2)
  261. rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0,0,0.2)
  262. end
  263. se:destroy()
  264. for i = 1,2 do
  265. wait()
  266. game.Players.LocalPlayer.Character.Torso.Neck.C0 = game.Players.LocalPlayer.Character.Torso.Neck.C0 * CFrame.Angles(0,0,0.1)
  267. game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 = game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 * CFrame.Angles(0,0,0.1)
  268. rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0,0,0.1)
  269. end
  270. for i = 1,2 do
  271. wait()
  272. game.Players.LocalPlayer.Character.Torso.Neck.C0 = game.Players.LocalPlayer.Character.Torso.Neck.C0 * CFrame.Angles(0,0,-0.05)
  273. game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 = game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 * CFrame.Angles(0,0,0.1)
  274. rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0,0,0.1)
  275. end
  276. game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 = CFrame.new(0, 0, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  277. game.Players.LocalPlayer.Character.Torso.Neck.C0 = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  278. lhandweld.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  279. lhandweld.C1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  280. rhandweld.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  281. rhandweld.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  282. using = false
  283. end
  284. end
  285. function combo(key)
  286. key = key:lower()
  287. if key == "q" then
  288. if not using then
  289. using = true
  290. swinging:Play()
  291. for i = 1,2 do
  292. wait()
  293. lhandweld.C0 = lhandweld.C0 * CFrame.Angles(0,0,-0.05)
  294. rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0,0,0.05)
  295. end
  296. for i = 1,3 do
  297. wait()
  298. lhandweld.C0 = lhandweld.C0 * CFrame.Angles(0,0,-0.47)
  299. rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0,0,0.47)
  300. end
  301. for i = 1,2 do
  302. wait()
  303. lhandweld.C0 = lhandweld.C0 * CFrame.Angles(0,0,-0.05)
  304. rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0,0,0.05)
  305. end
  306. wait(0.4)
  307. swinging:Play()
  308. for i = 1,2 do
  309. wait()
  310. weld.C0 = weld.C0 * CFrame.Angles(0.13,0,0.05) * CFrame.new(0,-0.27,0.1)
  311. lhandweld.C0 = lhandweld.C0 * CFrame.Angles(0.05,0,0)
  312. rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0.05,0,00)
  313. end
  314. for i = 1,3 do
  315. wait()
  316. weld.C0 = weld.C0 * CFrame.Angles(0.33,0,0.1) * CFrame.new(0,-0.66,0.3)
  317. lhandweld.C0 = lhandweld.C0 * CFrame.Angles(0.2,0,0)
  318. rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0.2,0,0)
  319. end
  320. for i = 1,2 do
  321. wait()
  322. weld.C0 = weld.C0 * CFrame.Angles(0.13,0,0.05) * CFrame.new(0,-0.27,0.1)
  323. lhandweld.C0 = lhandweld.C0 * CFrame.Angles(0.05,0,0)
  324. rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0.05,0,00)
  325. end
  326. wait(0.5)
  327. for i = 1,2 do
  328. wait()
  329. game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 = game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 * CFrame.Angles(0,0,-0.05)
  330. end
  331. for i = 1,2 do
  332. wait()
  333. game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 = game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 * CFrame.Angles(0,0,-0.1)
  334. end
  335. for i = 1,2 do
  336. wait()
  337. game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 = game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 * CFrame.Angles(0,0,-0.2)
  338. end
  339. for i = 1,2 do
  340. wait()
  341. game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 = game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 * CFrame.Angles(0,0,-0.4)
  342. end
  343. swinging:Play()
  344. for i = 1,2 do
  345. wait()
  346. game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 = game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 * CFrame.Angles(0,0,-0.8)
  347. end
  348. local se = Instance.new("Part", bat)
  349. se.Size = Vector3.new(1, 1, 3)
  350. se:BreakJoints()
  351. se.Transparency = 1
  352. se.CanCollide = false
  353. local dmgweld = Instance.new("Weld", se)
  354. dmgweld.Part0 = bat
  355. dmgweld.Part1 = se
  356. dmgweld.C0 = dmgweld.C0 * CFrame.new(0,0,1)
  357. local function dmg(part)
  358. if not hit then
  359. hit = true
  360. local hum = part.Parent:findFirstChild("Humanoid")
  361. if hum ~= nil then
  362. baseballhit:Play()
  363. baseballhit1:Play()
  364. hum.Health = hum.Health - math.random(5,25)
  365. hum.PlatformStand = true
  366. local tor = part.Parent:findFirstChild("Torso")
  367. if tor then
  368. local vel = Instance.new("BodyVelocity", tor)
  369. vel.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  370. vel.Velocity = game.Players.LocalPlayer.Character.Torso.CFrame.rightVector * 35
  371. wait(0.1)
  372. vel:destroy()
  373. hit = false
  374. end
  375. wait(0.2)
  376. hit = false
  377. wait(1.5)
  378. hum.PlatformStand = false
  379. end
  380. end
  381. end
  382. se.Touched:connect(dmg)
  383. for i = 1,20 do
  384. swinging:Play()
  385. for i = 1,10 do
  386. wait()
  387. game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 = game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 * CFrame.Angles(0,0,-0.9)
  388. end
  389. end
  390. game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 = CFrame.new(0, 0, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  391. game.Players.LocalPlayer.Character.Torso.Neck.C0 = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  392. for i = 1,2 do
  393. wait()
  394. lhandweld.C0 = lhandweld.C0 * CFrame.Angles(0,0,0.05)
  395. rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0,0,-0.05)
  396. end
  397. for i = 1,3 do
  398. wait()
  399. lhandweld.C0 = lhandweld.C0 * CFrame.Angles(0,0,0.47)
  400. rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0,0,-0.47)
  401. end
  402. for i = 1,2 do
  403. wait()
  404. lhandweld.C0 = lhandweld.C0 * CFrame.Angles(0,0,0.05)
  405. rhandweld.C0 = rhandweld.C0 * CFrame.Angles(0,0,-0.05)
  406. end
  407. wait(0.4)
  408. swinging:Play()
  409. for i = 1,2 do
  410. wait()
  411. lhandweld.C0 = lhandweld.C0 * CFrame.Angles(-0.05,0,0)
  412. rhandweld.C0 = rhandweld.C0 * CFrame.Angles(-0.05,0,00)
  413. end
  414. for i = 1,3 do
  415. wait()
  416. lhandweld.C0 = lhandweld.C0 * CFrame.Angles(-0.2,0,0)
  417. rhandweld.C0 = rhandweld.C0 * CFrame.Angles(-0.2,0,0)
  418. end
  419. for i = 1,2 do
  420. wait()
  421. lhandweld.C0 = lhandweld.C0 * CFrame.Angles(-0.05,0,0)
  422. rhandweld.C0 = rhandweld.C0 * CFrame.Angles(-0.05,0,00)
  423. end
  424. for i = 1,2 do
  425. wait()
  426. weld.C0 = weld.C0 * CFrame.Angles(-0.13,0,-0.05) * CFrame.new(0,0.27,-0.1)
  427. end
  428. for i = 1,3 do
  429. wait()
  430. weld.C0 = weld.C0 * CFrame.Angles(-0.33,0,-0.1) * CFrame.new(0,0.66,-0.3)
  431. end
  432. for i = 1,2 do
  433. wait()
  434. weld.C0 = weld.C0 * CFrame.Angles(-0.13,0,-0.05) * CFrame.new(0,0.27,-0.1)
  435. end
  436. weld.C0 = CFrame.new(-0.0159739517, -0.949999988, -1.89993286, -0.999964654, 0, -0.00840734318, 0, 1, 0, 0.00840734318, 0, -0.999964654)
  437. game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint.C0 = CFrame.new(0, 0, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  438. game.Players.LocalPlayer.Character.Torso.Neck.C0 = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  439. lhandweld.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  440. lhandweld.C1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  441. rhandweld.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  442. rhandweld.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  443. using = false
  444. se:destroy()
  445. end
  446. end
  447. end
  448. mouse.KeyDown:connect(combo)
  449. mouse.Button1Down:connect(hit)
  450. --[[
  451. local vel = Instance.new("BodyVelocity", game.Players.LocalPlayer.Character.Torso)
  452. vel.Velocity = game.Players.LocalPlayer.Character.Torso.CFrame.lookVector * -5
  453. vel.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  454. --]]
  455. --By Rufus14 (FINALLY I KNOW HOW TO MAKE A RAGDOLL :D)
  456. --die plz
  457. mouse = game.Players.LocalPlayer:GetMouse()
  458. function ragdoll()
  459. game.Players.LocalPlayer.Character.Archivable = true
  460. clone = game.Players.LocalPlayer.Character:Clone()
  461. clone.Parent = workspace
  462. for i,v in pairs(clone:GetChildren()) do
  463. if v.ClassName == "Script" or v.ClassName == "LocalScript" then
  464. v:destroy()
  465. end
  466. for i,p in pairs(v:GetChildren()) do
  467. if p.ClassName == "Weld" or p.ClassName == "Motor6D" or p.ClassName == "BodyVelocity" then
  468. p:destroy()
  469. end
  470. end
  471. end
  472. for i,t in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  473. if t.ClassName == "Accessory" or t.ClassName == "ForceField" then
  474. t:destroy()
  475. end
  476. end
  477. vel = Instance.new("BodyVelocity", clone.Torso)
  478. vel.Velocity = clone.Torso.CFrame.lookVector * -5
  479. vel.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  480. clone.Head.face.Texture = "http://www.roblox.com/asset/?id=161061608"
  481. using = false
  482. hit = Instance.new("Sound", clone.Torso)
  483. hit.SoundId = "rbxassetid://260430060"
  484. hit.Volume = 5
  485. hit1 = Instance.new("Sound", clone.Torso)
  486. hit1.SoundId = "rbxassetid://138087186"
  487. hit1.Volume = 5
  488. hit2 = Instance.new("Sound", clone.Torso)
  489. hit2.SoundId = "rbxassetid://131237241"
  490. hit2.Volume = 5
  491. hit3 = Instance.new("Sound", clone.Torso)
  492. hit3.SoundId = "rbxassetid://278062209"
  493. hit3.Volume = 5
  494. hit3.TimePosition = 0.33
  495. ded = Instance.new("Sound", clone.Torso)
  496. ded.SoundId = "rbxassetid://418892870"
  497. ded.Volume = 5
  498. local leftarm = clone:findFirstChild("Left Arm")
  499. local rightrm = clone:findFirstChild("Right Arm")
  500. local leftleg = clone:findFirstChild("Left Leg")
  501. local rightleg = clone:findFirstChild("Right Leg")
  502. local head = clone:findFirstChild("Head")
  503. local welding = Instance.new("Weld", clone.Torso)
  504. welding.Part0 = clone.Torso
  505. welding.Part1 = head
  506. welding.C0 = welding.C0 * CFrame.new(0,1.5,0)
  507. for i, g in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  508. if g.ClassName == "Part" then
  509. g:destroy()
  510. end
  511. end
  512. for i, h in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  513. if h.ClassName == "Accesory" then
  514. h:destroy()
  515. end
  516. end
  517. game.Workspace.CurrentCamera.CameraSubject = head
  518. if leftleg ~= nil then
  519. local glue = Instance.new("Glue", clone.Torso)
  520. glue.Part0 = clone.Torso
  521. glue.Part1 = leftleg
  522. glue.Name = "Left leg"
  523. local collider = Instance.new("Part", leftleg)
  524. collider.Position = Vector3.new(0,999,0)
  525. collider.Size = Vector3.new(1.7, 1, 1)
  526. collider.Shape = "Cylinder"
  527. local weld = Instance.new("Weld", collider)
  528. weld.Part0 = leftleg
  529. weld.Part1 = collider
  530. weld.C0 = CFrame.Angles(0, 0, 80)
  531. collider.TopSurface = "Smooth"
  532. collider.BottomSurface = "Smooth"
  533. collider.formFactor = "Symmetric"
  534. glue.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  535. glue.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  536. collider.Transparency = 1
  537. end
  538. ------------
  539. if rightleg ~= nil then
  540. local glue1 = Instance.new("Glue", clone.Torso)
  541. glue1.Part0 = clone.Torso
  542. glue1.Part1 = rightleg
  543. glue1.Name = "Right leg"
  544. local collider1 = Instance.new("Part", rightleg)
  545. collider1.Position = Vector3.new(0,999,0)
  546. collider1.Size = Vector3.new(1.7, 1, 1)
  547. collider1.Shape = "Cylinder"
  548. local weld1 = Instance.new("Weld", collider1)
  549. weld1.Part0 = rightleg
  550. weld1.Part1 = collider1
  551. weld1.C0 = CFrame.Angles(0, 0, 80)
  552. collider1.TopSurface = "Smooth"
  553. collider1.BottomSurface = "Smooth"
  554. collider1.formFactor = "Symmetric"
  555. glue1.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  556. glue1.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  557. collider1.Transparency = 1
  558. end
  559. ------------
  560. if rightrm ~= nil then
  561. local glue11 = Instance.new("Glue", clone.Torso)
  562. glue11.Part0 = clone.Torso
  563. glue11.Part1 = rightrm
  564. glue11.Name = "Right shoulder"
  565. local collider11 = Instance.new("Part", rightrm)
  566. collider11.Position = Vector3.new(0,9999,0)
  567. collider11.Size = Vector3.new(1.8,1,1)
  568. collider11.Shape = "Cylinder"
  569. local weld11 = Instance.new("Weld", collider11)
  570. weld11.Part0 = rightrm
  571. weld11.Part1 = collider11
  572. weld11.C0 = CFrame.Angles(0, 0, 80)
  573. collider11.TopSurface = "Smooth"
  574. collider11.BottomSurface = "Smooth"
  575. collider11.formFactor = "Symmetric"
  576. glue11.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  577. glue11.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  578. collider11.Transparency = 1
  579. end
  580. ------------
  581. if leftarm ~= nil then
  582. local glue111 = Instance.new("Glue", clone.Torso)
  583. glue111.Part0 = clone.Torso
  584. glue111.Part1 = leftarm
  585. glue111.Name = "Left shoulder"
  586. local collider111 = Instance.new("Part", leftarm)
  587. collider111.Position = Vector3.new(0,9999,0)
  588. collider111.Size = Vector3.new(1.8,1,1)
  589. collider111.Shape = "Cylinder"
  590. local weld111 = Instance.new("Weld", collider111)
  591. weld111.Part0 = leftarm
  592. weld111.Part1 = collider111
  593. weld111.C0 = CFrame.Angles(0, 0, 80)
  594. collider111.TopSurface = "Smooth"
  595. collider111.BottomSurface = "Smooth"
  596. collider111.formFactor = "Symmetric"
  597. glue111.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  598. glue111.C1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  599. collider111.Transparency = 1
  600. ----------------
  601. sensoring = Instance.new("Part", clone.Torso)
  602. sensoring.Size = Vector3.new(1.2,1.1,0.8)
  603. sensoring.CanCollide = false
  604. sensoring.Position = clone.Torso.Position
  605. local welder = Instance.new("Weld", sensoring)
  606. welder.Part0 = clone.Torso
  607. welder.Part1 = sensoring
  608. welder.C0 = welder.C0 * CFrame.new(0,0,1.05)
  609. sensoring.Transparency = 1
  610. -----------------
  611. sensoring1 = Instance.new("Part", clone.Torso)
  612. sensoring1.Size = Vector3.new(1.2,1.1,0.8)
  613. sensoring1.CanCollide = false
  614. sensoring1.Position = clone.Torso.Position
  615. local welder1 = Instance.new("Weld", sensoring)
  616. welder1.Part0 = clone.Torso
  617. welder1.Part1 = sensoring1
  618. welder1.C0 = welder1.C0 * CFrame.new(0,0,-1.05)
  619. sensoring1.Transparency = 1
  620. end
  621. clone.Name = game.Players.LocalPlayer.Character.Name.." (DEAD)"
  622. ded:Play()
  623. vel:destroy()
  624. wait(0.5)
  625. local function touch()
  626. if not using then
  627. using = true
  628. local Math = math.random(1,4)
  629. if Math == 1 then
  630. hit:Play()
  631. end
  632. if Math == 2 then
  633. hit1:Play()
  634. end
  635. if Math == 3 then
  636. hit2:Play()
  637. end
  638. if Math == 4 then
  639. hit3:Play()
  640. end
  641. wait(0.1)
  642. using = false
  643. end
  644. end
  645. sensoring.Touched:connect(touch)
  646. sensoring1.Touched:connect(touch)
  647. wait(4.47)
  648. hit1.Volume = 0
  649. hit2.Volume = 0
  650. hit3.Volume = 0
  651. hit.Volume = 0
  652. end
  653.  
  654. game.Players.LocalPlayer.Character.Humanoid.Died:connect(ragdoll)
  655.  
  656. --di ent
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement