TheFakeFew

Sans.

Nov 30th, 2022 (edited)
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 39.40 KB | None | 0 0
  1. local Playrrr=owner
  2.  
  3. wait()
  4. script.Parent = nil
  5.  
  6. local genv={}
  7. Decode = function(str,t,props,classes,values,ICList,Model,CurPar,LastIns,split,RemoveAndSplit,InstanceList)
  8. local tonum,table_remove,inst,parnt,comma,table_foreach = tonumber,table.remove,Instance.new,"Parent",",",
  9. function(t,f)
  10. for a,b in pairs(t) do
  11. f(a,b)
  12. end
  13. end
  14. local Types = {
  15. Color3 = Color3.new,
  16. Vector3 = Vector3.new,
  17. Vector2 = Vector2.new,
  18. UDim = UDim.new,
  19. UDim2 = UDim2.new,
  20. CFrame = CFrame.new,
  21. Rect = Rect.new,
  22. NumberRange = NumberRange.new,
  23. BrickColor = BrickColor.new,
  24. PhysicalProperties = PhysicalProperties.new,
  25. NumberSequence = function(...)
  26. local a = {...}
  27. local t = {}
  28. repeat
  29. t[#t+1] = NumberSequenceKeypoint.new(table_remove(a,1),table_remove(a,1),table_remove(a,1))
  30. until #a==0
  31. return NumberSequence.new(t)
  32. end,
  33. ColorSequence = function(...)
  34. local a = {...}
  35. local t = {}
  36. repeat
  37. t[#t+1] = ColorSequenceKeypoint.new(table_remove(a,1),Color3.new(table_remove(a,1),table_remove(a,1),table_remove(a,1)))
  38. until #a==0
  39. return ColorSequence.new(t)
  40. end,
  41. number = tonumber,
  42. boolean = function(a)
  43. return a=="1"
  44. end
  45. }
  46. split = function(str,sep)
  47. if not str then return end
  48. local fields = {}
  49. local ConcatNext = false
  50. str:gsub(("([^%s]+)"):format(sep),function(c)
  51. if ConcatNext == true then
  52. fields[#fields] = fields[#fields]..sep..c
  53. ConcatNext = false
  54. else
  55. fields[#fields+1] = c
  56. end
  57. if c:sub(#c)=="\\" then
  58. c = fields[#fields]
  59. fields[#fields] = c:sub(1,#c-1)
  60. ConcatNext = true
  61. end
  62. end)
  63. return fields
  64. end
  65. RemoveAndSplit = function(t)
  66. return split(table_remove(t,1),comma)
  67. end
  68. t = split(str,";")
  69. props = RemoveAndSplit(t)
  70. classes = RemoveAndSplit(t)
  71. values = split(table_remove(t,1),'|')
  72. ICList = RemoveAndSplit(t)
  73. InstanceList = {}
  74. Model = inst"Model"
  75. CurPar = Model
  76. table_foreach(t,function(ct,c)
  77. if c=="n" or c=="p" then
  78. CurPar = c=="n" and LastIns or CurPar[parnt]
  79. else
  80. ct = split(c,"|")
  81. local class = classes[tonum(table_remove(ct,1))]
  82. if class=="UnionOperation" then
  83. LastIns = {UsePartColor="1"}
  84. else
  85. LastIns = inst(class)
  86. if LastIns:IsA"Script" then
  87. s(LastIns)
  88. elseif LastIns:IsA("ModuleScript") then
  89. ms(LastIns)
  90. end
  91. end
  92.  
  93. local function SetProperty(LastIns,p,str,s)
  94. s = Types[typeof(LastIns[p])]
  95. if p=="CustomPhysicalProperties" then
  96. s = PhysicalProperties.new
  97. end
  98. if s then
  99. LastIns[p] = s(unpack(split(str,comma)))
  100. else
  101. LastIns[p] = str
  102. end
  103. end
  104.  
  105. local UnionData
  106. table_foreach(ct,function(s,p,a,str)
  107. a = p:find":"
  108. p,str = props[tonum(p:sub(1,a-1))],values[tonum(p:sub(a+1))]
  109. if p=="UnionData" then
  110. UnionData = split(str," ")
  111. return
  112. end
  113. if class=="UnionOperation" then
  114. LastIns[p] = str
  115. return
  116. end
  117. SetProperty(LastIns,p,str)
  118. end)
  119.  
  120. if UnionData then
  121. local LI_Data = LastIns
  122. LastIns = DecodeUnion(UnionData)
  123. table_foreach(LI_Data,function(p,str)
  124. SetProperty(LastIns,p,str)
  125. end)
  126. end
  127. table.insert(InstanceList,LastIns)
  128. LastIns[parnt] = CurPar
  129. end
  130. end)
  131. table_remove(ICList,1)
  132. table_foreach(ICList,function(a,b)
  133. b = split(b,">")
  134. InstanceList[tonum(b[1])][props[tonum(b[2])]] = InstanceList[tonum(b[3])]
  135. end)
  136.  
  137. return Model:GetChildren()
  138. end
  139.  
  140. local Objects = Decode('Name,PrimaryPart,Locked,Position,Orientation,Velocity,Size,TopSurface,Scale,Texture,CFrame,Color,Transparency,LightInfluence,Speed,LightEmission,ZOffset,Acceleration,Lifetime,LockedToPart,Rate,RotSpee'
  141. ..'d,Rotation,LeftSurface,RightSurface,MaxVelocity,C0,C1,Part0,Part1,CanCollide,BottomSurface;Part,Model,SpecialMesh,Decal,Attachment,ParticleEmitter,Motor6D,Humanoid;Part|Rig|Head|1|-0.0001,6.5,0|0,-0.0'
  142. ..'701,0|-0.0001,0,0|2,1,1|0|1.25,1.25,1.25|face|rbxasset://textures/face.png|HairAttachment|0,0.6,0|0,0.6,0,1,0,0,0,1,0,0,0,1|HatAttachment|FaceFrontAttachment|0,0,-0.6001|0,0,-0.6001,1,0,0,0,1,0,0,0,1|'
  143. ..'FaceCenterAttachment|-0.1001,0.25,-0.6001|-0.1001,0.25,-0.6001,1,0,0,0,1,0,0,0,1|0,0.6352,0,1,0.5121,0.6243,0.0173,1,1,0,1,1|0,0.75,0,1,1,0|0,0.1299,0,1,0,0|rbxassetid://5313817234|0,0|0.2|-0.8845,0.8'
  144. ..',0|2,2|inf|-360,360|Torso|0,5,0|2,2,1|2|NeckAttachment|0,1,0|0,1,0,1,0,0,0,1,0,0,0,1|BodyFrontAttachment|0,0,-0.5|0,0,-0.5,1,0,0,0,1,0,0,0,1|BodyBackAttachment|0,0,0.5|0,0,0.5,1,0,0,0,1,0,0,0,1|LeftCo'
  145. ..'llarAttachment|-1,1,0|-1,1,0,1,0,0,0,1,0,0,0,1|RightCollarAttachment|1,1,0|1,1,0,1,0,0,0,1,0,0,0,1|WaistFrontAttachment|0,-1,-0.5|0,-1,-0.5,1,0,0,0,1,0,0,0,1|WaistCenterAttachment|0,-1,0|0,-1,0,1,0,0,'
  146. ..'0,1,0,0,0,1|WaistBackAttachment|0,-1,0.5|0,-1,0.5,1,0,0,0,1,0,0,0,1|Right Shoulder|0.1|1,0.5,0,0,0,1,0,1,-0,-1,0,0|-0.5,0.5,0,0,0,1,0,1,-0,-1,0,0|Left Shoulder|-1,0.5,0,0,0,-1,0,1,0,1,0,0|0.5,0.5,0,0,'
  147. ..'0,-1,0,1,0,1,0,0|Right Hip|1,-1,0,0,0,1,0,1,-0,-1,0,0|0.5,1,0,0,0,1,0,1,-0,-1,0,0|Left Hip|-1,-1,0,0,0,-1,0,1,0,1,0,0|-0.5,1,0,0,0,-1,0,1,0,1,0,0|Neck|0,1,0,-1,0,0,0,0,1,0,1,-0|0,-0.5,0,-1,0,0,0,0,1,0'
  148. ..',1,-0|Left Arm|-1.5,5,-0.0019|1,2,1|0|LeftShoulderAttachment|0,0.5,0|0,0.5,0,1,0,0,0,1,0,0,0,1|Right Arm|1.4999,5,0.0018|RightShoulderAttachment|Left Leg|-0.5,3,-0.0007|Right Leg|0.4999,3,0.0006|Human'
  149. ..'oidRootPart|RootJoint|0,0,0,-1,0,0,0,0,1,0,1,-0;0,1>2>2,20>29>11,20>30>27,21>29>11,21>30>25,22>29>11,22>30>30,23>29>11,23>30>29,24>29>11,24>30>2,33>29>32,33>30>11;2|1:2;n;1|1:3|3:4|4:5|5:6|6:7|7:8|8:9'
  150. ..';n;3|9:10;4|1:11|10:12;5|1:13|4:14|11:15;5|1:16|4:14|11:15;5|1:17|4:18|11:19;5|1:20;5|4:21|11:22;n;6|12:23|13:24|7:25|10:26|14:4|12:23|15:27|16:4|17:28|18:29|12:23|19:30|20:4|21:31|22:32|23:32;p;p;1|1'
  151. ..':33|3:4|4:34|5:6|6:7|7:35|24:36|25:36;n;5|1:37|4:38|11:39;5|1:40|4:41|11:42;5|1:43|4:44|11:45;5|1:46|4:47|11:48;5|1:49|4:50|11:51;5|1:52|4:53|11:54;5|1:55|4:56|11:57;5|1:58|4:59|11:60;7|1:61|26:62|27:'
  152. ..'63|28:64;7|1:65|26:62|27:66|28:67;7|1:68|26:62|27:69|28:70;7|1:71|26:62|27:72|28:73;7|1:74|26:62|27:75|28:76;p;1|1:77|3:4|4:78|5:6|6:7|7:79|31:80;n;5|1:81|4:82|11:83;p;1|1:84|3:4|4:85|5:6|6:7|7:79|31:'
  153. ..'80;n;5|1:86|4:82|11:83;p;1|1:87|3:4|4:88|5:6|6:7|7:79|31:80|32:9;1|1:89|3:4|4:90|5:6|6:7|7:79|31:80|32:9;8;1|1:91|3:4|13:4|4:34|5:6|6:7|7:35|31:80|32:9|8:9;n;7|1:92|26:62|27:93|28:93;p;p;')
  154. for _,Object in pairs(Objects) do
  155. Object.Parent = script
  156. end
  157.  
  158.  
  159. BillboardGui0 = Instance.new("BillboardGui")
  160. TextLabel1 = Instance.new("TextLabel")
  161. BillboardGui0.Name = "Chat"
  162. BillboardGui0.Parent = script
  163. BillboardGui0.Size = UDim2.new(15, 0, 7, 0)
  164. BillboardGui0.Active = true
  165. BillboardGui0.ClipsDescendants = true
  166. BillboardGui0.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  167. TextLabel1.Parent = BillboardGui0
  168. TextLabel1.Size = UDim2.new(1, 0, 1, 0)
  169. TextLabel1.BackgroundColor = BrickColor.new("Institutional white")
  170. TextLabel1.BackgroundColor3 = Color3.new(1, 1, 1)
  171. TextLabel1.BackgroundTransparency = 1
  172. TextLabel1.Font = Enum.Font.Arcade
  173. TextLabel1.FontSize = Enum.FontSize.Size14
  174. TextLabel1.Text = ""
  175. TextLabel1.TextColor = BrickColor.new("Institutional white")
  176. TextLabel1.TextColor3 = Color3.new(1, 1, 1)
  177. TextLabel1.TextScaled = true
  178. TextLabel1.TextSize = 14
  179. TextLabel1.TextStrokeTransparency = 0
  180. TextLabel1.TextWrap = true
  181. TextLabel1.TextWrapped = true
  182.  
  183.  
  184. local plr = Playrrr
  185. local rig = script.Rig
  186. pcall(function()
  187. for i,v in pairs(plr.Character:GetChildren()) do
  188. if v:IsA'Shirt' or v:IsA'BodyColors' or v:IsA'Pants' or v:IsA'Accessory' or v:IsA'ShirtGraphic' then
  189. v:Clone().Parent = rig
  190. elseif v:IsA'BasePart' and rig:FindFirstChild(v.Name) ~= nil then
  191. rig:FindFirstChild(v.Name).Color = v.Color
  192. end
  193. end
  194. if plr.Character:FindFirstChild('Head') ~= nil and plr.Character:FindFirstChild('Head'):FindFirstChild('face') ~= nil then
  195. rig:FindFirstChild('Head'):FindFirstChild('face').Texture = plr.Character:FindFirstChild('Head'):FindFirstChild('face').Texture
  196. end
  197. if plr.Character:FindFirstChild('HumanoidRootPart') ~= nil then
  198. rig:FindFirstChild('HumanoidRootPart').CFrame = plr.Character:FindFirstChild('HumanoidRootPart').CFrame
  199. end
  200. end)
  201. local chr = rig:Clone()
  202. chr:FindFirstChildOfClass('Humanoid').DisplayDistanceType="None"
  203. chr.Parent = workspace
  204. plr.Character = chr
  205. local head = chr["Head"]
  206. local torso = chr["Torso"]
  207. local larm = chr["Left Arm"]
  208. local lleg = chr["Left Leg"]
  209. local rarm = chr["Right Arm"]
  210. local rleg = chr["Right Leg"]
  211. local root = chr["HumanoidRootPart"]
  212. local att = head["Attachment"]
  213. local RootJoint = root.RootJoint
  214. local RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
  215. local Necko = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  216. local sin = 0
  217. function rayCast(Pos, Dir, Max, Ignore)
  218. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  219. end
  220. local hitfloor, posfloor = rayCast(root.Position, CFrame.new(root.Position, root.Position - Vector3.new(0, 1, 0)).LookVector, 4, chr)
  221. local sndid = 11703498431
  222. local vol = 4
  223. local pit = 1
  224. local pos = 0
  225. local mus
  226. local Attack = false
  227. local rem
  228. local lines = {
  229. "what? you think i'm just gonna stand there and take it?",
  230. "our reports showed a massive anomaly in the timespace continuum. timelines jumping left and right, stopping and starting... until suddenly, everything ends. heh heh heh... that's your fault, isn't it?",
  231. "you can't understand how this feels. knowing that one day, without any warning... it's all going to be reset.",
  232. "look. i gave up trying to go back a long time ago. and getting to the surface doesn't really appeal anymore, either. cause even if we do... we'll just end up right back here, without any memory of it, right?",
  233. "to be blunt... it makes it kind of hard to give it my all. ... or is that just a poor excuse for being lazy...? hell if i know.",
  234. "ugh... that being said... you, uh, really like swinging that thing around, huh?",
  235. "y'see... all this fighting is really tiring me out. and if you keep pushing me... then i'll be forced to use my special attack."
  236. }
  237.  
  238. function DescRem(v)
  239. if v.Name == "Head" or v.Name == "HumanoidRootPart" or v.Name == "Left Arm" or v.Name == "Left Leg" or v.Name == "Right Arm" or v.Name == "Right Leg" or v.Name == "Torso" or v.Name == "RootJoint" or v.Name == "Left Hip" or v.Name == "Left Shoulder" or v.Name == "Neck" or v.Name == "Right Hip" or v.Name == "Right Shoulder" or v:IsA('Humanoid') then
  240. pcall(function()
  241. Refit()
  242. end)
  243. end
  244. end
  245.  
  246. chr.DescendantRemoving:Connect(DescRem)
  247.  
  248. function teleport(pos)
  249. for i,v in next, chr:GetDescendants() do
  250. if v:IsA('BasePart') then
  251. local a = v:Clone()
  252. v = a
  253. a.Parent = workspace
  254. a:BreakJoints()
  255. a.Color = Color3.new(1,1,1)
  256. a.Material = Enum.Material.Neon
  257. a.Anchored = true
  258. a.CanCollide = false
  259. for i,v in next, a:GetDescendants() do
  260. if v:IsA('Sound') or v:IsA('ParticleEmitter') or v:IsA("GuiObject") then
  261. pcall(function()
  262. v.PlayOnRemove = false
  263. end)
  264. v:Destroy()
  265. elseif v:IsA("SpecialMesh") then
  266. v.TextureId = ""
  267. end
  268. end
  269. game:GetService('TweenService'):Create(a,TweenInfo.new(2),{
  270. Position = a.Position+Vector3.new(0,5,0),
  271. Orientation = a.Orientation + Vector3.new(math.random(-180,180),math.random(-180,180),math.random(-180,180)),
  272. Transparency = 1,
  273. Color = Color3.new(0,0,0)
  274. }):Play()
  275. coroutine.wrap(function()
  276. wait(2)
  277. a:Destroy()
  278. end)()
  279. end
  280. end
  281. local a = Instance.new("Part",workspace)
  282. a.Transparency = 1
  283. a.CanCollide = false
  284. a.Anchored = true
  285. a.Position = chr.HumanoidRootPart.Position
  286. local s = Instance.new('Sound',a)
  287. s.SoundId = "rbxassetid://3815044721"
  288. s.Volume = 3
  289. s.Pitch = 1
  290. s.PlayOnRemove = true
  291. s:Play()
  292. s:Destroy()
  293. coroutine.wrap(function()
  294. wait()
  295. a:Destroy()
  296. end)()
  297. chr:MoveTo(pos+Vector3.new(0,2,0))
  298. local a = Instance.new("Part",workspace)
  299. a.Transparency = 1
  300. a.CanCollide = false
  301. a.Anchored = true
  302. a.Position = chr.HumanoidRootPart.Position
  303. local s = Instance.new('Sound',a)
  304. s.SoundId = "rbxassetid://3815044721"
  305. s.Volume = 3
  306. s.Pitch = 1
  307. s.PlayOnRemove = true
  308. s:Play()
  309. s:Destroy()
  310. coroutine.wrap(function()
  311. wait()
  312. a:Destroy()
  313. end)()
  314. end
  315.  
  316. function Check()
  317. if not chr:IsDescendantOf(workspace) then
  318. Refit()
  319. end
  320. chr:FindFirstChildOfClass('Humanoid').DisplayDistanceType="Subject"
  321. chr:FindFirstChildOfClass('Humanoid').DisplayName = "sans."
  322. chr:FindFirstChildOfClass('Humanoid').MaxHealth = 1
  323. chr:FindFirstChildOfClass('Humanoid').Health = 1
  324. att.ParticleEmitter.Acceleration = Vector3.new(-0.6 - 0.4 * math.sin(sin/10),0.8,0)
  325. hitfloor, posfloor = rayCast(root.Position, CFrame.new(root.Position, root.Position - Vector3.new(0, 1, 0)).LookVector, 4, chr)
  326. if hitfloor then
  327. for i,v in pairs(rig:GetChildren()) do
  328. if v:IsA'BasePart' and chr:FindFirstChild(v.Name) then
  329. v.CFrame = chr:FindFirstChild(v.Name).CFrame
  330. end
  331. end
  332. end
  333. if game:GetService('ReplicatedStorage'):FindFirstChild(plr.Name.."Mouse") == nil then
  334. rem = Instance.new('RemoteEvent')
  335. rem.Name = plr.Name.."Mouse"
  336. rem.Parent = game:GetService('ReplicatedStorage')
  337. rem.OnServerEvent:Connect(function(_,k,h)
  338. if k == "z" then
  339. Blaster(h.p)
  340. elseif k == "r" then
  341. teleport(h.p)
  342. elseif k == "p" then
  343. Refit()
  344. end
  345. end)
  346. end
  347. if plr:FindFirstChildOfClass('PlayerGui'):FindFirstChild('Mouse') == nil then
  348. NLS([[local plr = game:GetService('Players').LocalPlayer
  349. local m = plr:GetMouse()
  350. m.KeyDown:Connect(function(k)
  351. game:GetService('ReplicatedStorage'):FindFirstChild(plr.Name.."Mouse"):FireServer(tostring(k),m.Hit)
  352. end)]],plr:FindFirstChildOfClass('PlayerGui')).Name = "Mouse"
  353. end
  354. if mus == nil or torso:FindFirstChild('Music') == nil then
  355. if mus ~= nil and mus:IsA'Sound' then
  356. mus:Destroy()
  357. end
  358. mus = Instance.new('Sound')
  359. mus.Parent = torso
  360. mus.Name = "Music"
  361. mus.SoundId = "rbxassetid://"..sndid
  362. mus.Volume = vol
  363. mus.Pitch = pit
  364. mus.TimePosition = pos
  365. mus.Looped = true
  366. mus:Play()
  367. elseif mus ~= nil and torso:FindFirstChild('Music') ~= nil then
  368. pos = mus.TimePosition
  369. mus.Parent = torso
  370. mus.Name = "Music"
  371. mus.SoundId = "rbxassetid://"..sndid
  372. mus.Volume = vol
  373. mus.Pitch = pit
  374. mus.Looped = true
  375. mus:Resume()
  376. end
  377. end
  378.  
  379. function SetScripts()
  380. Instance.new('Animator',chr:FindFirstChildOfClass('Humanoid'))
  381. LocalScript0 = Instance.new("LocalScript")
  382. StringValue1 = Instance.new("StringValue")
  383. Animation2 = Instance.new("Animation")
  384. NumberValue3 = Instance.new("NumberValue")
  385. Animation4 = Instance.new("Animation")
  386. NumberValue5 = Instance.new("NumberValue")
  387. StringValue6 = Instance.new("StringValue")
  388. Animation7 = Instance.new("Animation")
  389. StringValue8 = Instance.new("StringValue")
  390. Animation9 = Instance.new("Animation")
  391. StringValue10 = Instance.new("StringValue")
  392. Animation11 = Instance.new("Animation")
  393. StringValue12 = Instance.new("StringValue")
  394. Animation13 = Instance.new("Animation")
  395. StringValue14 = Instance.new("StringValue")
  396. Animation15 = Instance.new("Animation")
  397. StringValue16 = Instance.new("StringValue")
  398. Animation17 = Instance.new("Animation")
  399. StringValue18 = Instance.new("StringValue")
  400. Animation19 = Instance.new("Animation")
  401. NumberValue20 = Instance.new("NumberValue")
  402. LocalScript0 = NLS([[local Figure = script.Parent
  403. local Torso = Figure:WaitForChild("Torso")
  404. local RightShoulder = Torso:WaitForChild("Right Shoulder")
  405. local LeftShoulder = Torso:WaitForChild("Left Shoulder")
  406. local RightHip = Torso:WaitForChild("Right Hip")
  407. local LeftHip = Torso:WaitForChild("Left Hip")
  408. local Neck = Torso:WaitForChild("Neck")
  409. local Humanoid = Figure:WaitForChild("Humanoid")
  410. local pose = "Standing"
  411.  
  412. local currentAnim = ""
  413. local currentAnimInstance = nil
  414. local currentAnimTrack = nil
  415. local currentAnimKeyframeHandler = nil
  416. local currentAnimSpeed = 1.0
  417. local animTable = {}
  418. local animNames = {
  419. idle = {
  420. { id = "http://www.roblox.com/asset/?id=180435571", weight = 9 },
  421. { id = "http://www.roblox.com/asset/?id=180435792", weight = 1 }
  422. },
  423. walk = {
  424. { id = "http://www.roblox.com/asset/?id=180426354", weight = 10 }
  425. },
  426. run = {
  427. { id = "run.xml", weight = 10 }
  428. },
  429. jump = {
  430. { id = "http://www.roblox.com/asset/?id=125750702", weight = 10 }
  431. },
  432. fall = {
  433. { id = "http://www.roblox.com/asset/?id=180436148", weight = 10 }
  434. },
  435. climb = {
  436. { id = "http://www.roblox.com/asset/?id=180436334", weight = 10 }
  437. },
  438. sit = {
  439. { id = "http://www.roblox.com/asset/?id=178130996", weight = 10 }
  440. },
  441. toolnone = {
  442. { id = "http://www.roblox.com/asset/?id=182393478", weight = 10 }
  443. },
  444. toolslash = {
  445. { id = "http://www.roblox.com/asset/?id=129967390", weight = 10 }
  446. -- { id = "slash.xml", weight = 10 }
  447. },
  448. toollunge = {
  449. { id = "http://www.roblox.com/asset/?id=129967478", weight = 10 }
  450. },
  451. wave = {
  452. { id = "http://www.roblox.com/asset/?id=128777973", weight = 10 }
  453. },
  454. point = {
  455. { id = "http://www.roblox.com/asset/?id=128853357", weight = 10 }
  456. },
  457. dance1 = {
  458. { id = "http://www.roblox.com/asset/?id=182435998", weight = 10 },
  459. { id = "http://www.roblox.com/asset/?id=182491037", weight = 10 },
  460. { id = "http://www.roblox.com/asset/?id=182491065", weight = 10 }
  461. },
  462. dance2 = {
  463. { id = "http://www.roblox.com/asset/?id=182436842", weight = 10 },
  464. { id = "http://www.roblox.com/asset/?id=182491248", weight = 10 },
  465. { id = "http://www.roblox.com/asset/?id=182491277", weight = 10 }
  466. },
  467. dance3 = {
  468. { id = "http://www.roblox.com/asset/?id=182436935", weight = 10 },
  469. { id = "http://www.roblox.com/asset/?id=182491368", weight = 10 },
  470. { id = "http://www.roblox.com/asset/?id=182491423", weight = 10 }
  471. },
  472. laugh = {
  473. { id = "http://www.roblox.com/asset/?id=129423131", weight = 10 }
  474. },
  475. cheer = {
  476. { id = "http://www.roblox.com/asset/?id=129423030", weight = 10 }
  477. },
  478. }
  479. local dances = {"dance1", "dance2", "dance3"}
  480.  
  481. -- Existance in this list signifies that it is an emote, the value indicates if it is a looping emote
  482. local emoteNames = { wave = false, point = false, dance1 = true, dance2 = true, dance3 = true, laugh = false, cheer = false}
  483.  
  484. function configureAnimationSet(name, fileList)
  485. if (animTable[name] ~= nil) then
  486. for _, connection in pairs(animTable[name].connections) do
  487. connection:disconnect()
  488. end
  489. end
  490. animTable[name] = {}
  491. animTable[name].count = 0
  492. animTable[name].totalWeight = 0
  493. animTable[name].connections = {}
  494.  
  495. -- check for config values
  496. local config = script:FindFirstChild(name)
  497. if (config ~= nil) then
  498. -- print("Loading anims " .. name)
  499. table.insert(animTable[name].connections, config.ChildAdded:connect(function(child) configureAnimationSet(name, fileList) end))
  500. table.insert(animTable[name].connections, config.ChildRemoved:connect(function(child) configureAnimationSet(name, fileList) end))
  501. local idx = 1
  502. for _, childPart in pairs(config:GetChildren()) do
  503. if (childPart:IsA("Animation")) then
  504. table.insert(animTable[name].connections, childPart.Changed:connect(function(property) configureAnimationSet(name, fileList) end))
  505. animTable[name][idx] = {}
  506. animTable[name][idx].anim = childPart
  507. local weightObject = childPart:FindFirstChild("Weight")
  508. if (weightObject == nil) then
  509. animTable[name][idx].weight = 1
  510. else
  511. animTable[name][idx].weight = weightObject.Value
  512. end
  513. animTable[name].count = animTable[name].count + 1
  514. animTable[name].totalWeight = animTable[name].totalWeight + animTable[name][idx].weight
  515. -- print(name .. " [" .. idx .. "] " .. animTable[name][idx].anim.AnimationId .. " (" .. animTable[name][idx].weight .. ")")
  516. idx = idx + 1
  517. end
  518. end
  519. end
  520.  
  521. -- fallback to defaults
  522. if (animTable[name].count <= 0) then
  523. for idx, anim in pairs(fileList) do
  524. animTable[name][idx] = {}
  525. animTable[name][idx].anim = Instance.new("Animation")
  526. animTable[name][idx].anim.Name = name
  527. animTable[name][idx].anim.AnimationId = anim.id
  528. animTable[name][idx].weight = anim.weight
  529. animTable[name].count = animTable[name].count + 1
  530. animTable[name].totalWeight = animTable[name].totalWeight + anim.weight
  531. -- print(name .. " [" .. idx .. "] " .. anim.id .. " (" .. anim.weight .. ")")
  532. end
  533. end
  534. end
  535.  
  536. -- Setup animation objects
  537. function scriptChildModified(child)
  538. local fileList = animNames[child.Name]
  539. if (fileList ~= nil) then
  540. configureAnimationSet(child.Name, fileList)
  541. end
  542. end
  543.  
  544. script.ChildAdded:connect(scriptChildModified)
  545. script.ChildRemoved:connect(scriptChildModified)
  546.  
  547.  
  548. for name, fileList in pairs(animNames) do
  549. configureAnimationSet(name, fileList)
  550. end
  551.  
  552. -- ANIMATION
  553.  
  554. -- declarations
  555. local toolAnim = "None"
  556. local toolAnimTime = 0
  557.  
  558. local jumpAnimTime = 0
  559. local jumpAnimDuration = 0.3
  560.  
  561. local toolTransitionTime = 0.1
  562. local fallTransitionTime = 0.3
  563. local jumpMaxLimbVelocity = 0.75
  564.  
  565. -- functions
  566.  
  567. function stopAllAnimations()
  568. local oldAnim = currentAnim
  569.  
  570. -- return to idle if finishing an emote
  571. if (emoteNames[oldAnim] ~= nil and emoteNames[oldAnim] == false) then
  572. oldAnim = "idle"
  573. end
  574.  
  575. currentAnim = ""
  576. currentAnimInstance = nil
  577. if (currentAnimKeyframeHandler ~= nil) then
  578. currentAnimKeyframeHandler:disconnect()
  579. end
  580.  
  581. if (currentAnimTrack ~= nil) then
  582. currentAnimTrack:Stop()
  583. currentAnimTrack:Destroy()
  584. currentAnimTrack = nil
  585. end
  586. return oldAnim
  587. end
  588.  
  589. function setAnimationSpeed(speed)
  590. if speed ~= currentAnimSpeed then
  591. currentAnimSpeed = speed
  592. currentAnimTrack:AdjustSpeed(currentAnimSpeed)
  593. end
  594. end
  595.  
  596. function keyFrameReachedFunc(frameName)
  597. if (frameName == "End") then
  598.  
  599. local repeatAnim = currentAnim
  600. -- return to idle if finishing an emote
  601. if (emoteNames[repeatAnim] ~= nil and emoteNames[repeatAnim] == false) then
  602. repeatAnim = "idle"
  603. end
  604.  
  605. local animSpeed = currentAnimSpeed
  606. playAnimation(repeatAnim, 0.0, Humanoid)
  607. setAnimationSpeed(animSpeed)
  608. end
  609. end
  610.  
  611. -- Preload animations
  612. function playAnimation(animName, transitionTime, humanoid)
  613.  
  614. local roll = math.random(1, animTable[animName].totalWeight)
  615. local origRoll = roll
  616. local idx = 1
  617. while (roll > animTable[animName][idx].weight) do
  618. roll = roll - animTable[animName][idx].weight
  619. idx = idx + 1
  620. end
  621. -- print(animName .. " " .. idx .. " [" .. origRoll .. "]")
  622. local anim = animTable[animName][idx].anim
  623.  
  624. -- switch animation
  625. if (anim ~= currentAnimInstance) then
  626.  
  627. if (currentAnimTrack ~= nil) then
  628. currentAnimTrack:Stop(transitionTime)
  629. currentAnimTrack:Destroy()
  630. end
  631.  
  632. currentAnimSpeed = 1.0
  633.  
  634. -- load it to the humanoid; get AnimationTrack
  635. currentAnimTrack = humanoid:LoadAnimation(anim)
  636. currentAnimTrack.Priority = Enum.AnimationPriority.Core
  637.  
  638. -- play the animation
  639. currentAnimTrack:Play(transitionTime)
  640. currentAnim = animName
  641. currentAnimInstance = anim
  642.  
  643. -- set up keyframe name triggers
  644. if (currentAnimKeyframeHandler ~= nil) then
  645. currentAnimKeyframeHandler:disconnect()
  646. end
  647. currentAnimKeyframeHandler = currentAnimTrack.KeyframeReached:connect(keyFrameReachedFunc)
  648.  
  649. end
  650.  
  651. end
  652.  
  653. -------------------------------------------------------------------------------------------
  654. -------------------------------------------------------------------------------------------
  655.  
  656. local toolAnimName = ""
  657. local toolAnimTrack = nil
  658. local toolAnimInstance = nil
  659. local currentToolAnimKeyframeHandler = nil
  660.  
  661. function toolKeyFrameReachedFunc(frameName)
  662. if (frameName == "End") then
  663. -- print("Keyframe : ".. frameName)
  664. playToolAnimation(toolAnimName, 0.0, Humanoid)
  665. end
  666. end
  667.  
  668.  
  669. function playToolAnimation(animName, transitionTime, humanoid, priority)
  670.  
  671. local roll = math.random(1, animTable[animName].totalWeight)
  672. local origRoll = roll
  673. local idx = 1
  674. while (roll > animTable[animName][idx].weight) do
  675. roll = roll - animTable[animName][idx].weight
  676. idx = idx + 1
  677. end
  678. -- print(animName .. " * " .. idx .. " [" .. origRoll .. "]")
  679. local anim = animTable[animName][idx].anim
  680.  
  681. if (toolAnimInstance ~= anim) then
  682.  
  683. if (toolAnimTrack ~= nil) then
  684. toolAnimTrack:Stop()
  685. toolAnimTrack:Destroy()
  686. transitionTime = 0
  687. end
  688.  
  689. -- load it to the humanoid; get AnimationTrack
  690. toolAnimTrack = humanoid:LoadAnimation(anim)
  691. if priority then
  692. toolAnimTrack.Priority = priority
  693. end
  694.  
  695. -- play the animation
  696. toolAnimTrack:Play(transitionTime)
  697. toolAnimName = animName
  698. toolAnimInstance = anim
  699.  
  700. currentToolAnimKeyframeHandler = toolAnimTrack.KeyframeReached:connect(toolKeyFrameReachedFunc)
  701. end
  702. end
  703.  
  704. function stopToolAnimations()
  705. local oldAnim = toolAnimName
  706.  
  707. if (currentToolAnimKeyframeHandler ~= nil) then
  708. currentToolAnimKeyframeHandler:disconnect()
  709. end
  710.  
  711. toolAnimName = ""
  712. toolAnimInstance = nil
  713. if (toolAnimTrack ~= nil) then
  714. toolAnimTrack:Stop()
  715. toolAnimTrack:Destroy()
  716. toolAnimTrack = nil
  717. end
  718.  
  719.  
  720. return oldAnim
  721. end
  722.  
  723. -------------------------------------------------------------------------------------------
  724. -------------------------------------------------------------------------------------------
  725.  
  726.  
  727. function onRunning(speed)
  728. if speed > 0.01 then
  729. playAnimation("walk", 0.1, Humanoid)
  730. if currentAnimInstance and currentAnimInstance.AnimationId == "http://www.roblox.com/asset/?id=180426354" then
  731. setAnimationSpeed(speed / 14.5)
  732. end
  733. pose = "Running"
  734. else
  735. if emoteNames[currentAnim] == nil then
  736. playAnimation("idle", 0.1, Humanoid)
  737. pose = "Standing"
  738. end
  739. end
  740. end
  741.  
  742. function onDied()
  743. pose = "Dead"
  744. end
  745.  
  746. function onJumping()
  747. playAnimation("jump", 0.1, Humanoid)
  748. jumpAnimTime = jumpAnimDuration
  749. pose = "Jumping"
  750. end
  751.  
  752. function onClimbing(speed)
  753. playAnimation("climb", 0.1, Humanoid)
  754. setAnimationSpeed(speed / 12.0)
  755. pose = "Climbing"
  756. end
  757.  
  758. function onGettingUp()
  759. pose = "GettingUp"
  760. end
  761.  
  762. function onFreeFall()
  763. if (jumpAnimTime <= 0) then
  764. playAnimation("fall", fallTransitionTime, Humanoid)
  765. end
  766. pose = "FreeFall"
  767. end
  768.  
  769. function onFallingDown()
  770. pose = "FallingDown"
  771. end
  772.  
  773. function onSeated()
  774. pose = "Seated"
  775. end
  776.  
  777. function onPlatformStanding()
  778. pose = "PlatformStanding"
  779. end
  780.  
  781. function onSwimming(speed)
  782. if speed > 0 then
  783. pose = "Running"
  784. else
  785. pose = "Standing"
  786. end
  787. end
  788.  
  789. function getTool()
  790. for _, kid in ipairs(Figure:GetChildren()) do
  791. if kid.className == "Tool" then return kid end
  792. end
  793. return nil
  794. end
  795.  
  796. function getToolAnim(tool)
  797. for _, c in ipairs(tool:GetChildren()) do
  798. if c.Name == "toolanim" and c.className == "StringValue" then
  799. return c
  800. end
  801. end
  802. return nil
  803. end
  804.  
  805. function animateTool()
  806.  
  807. if (toolAnim == "None") then
  808. playToolAnimation("toolnone", toolTransitionTime, Humanoid, Enum.AnimationPriority.Idle)
  809. return
  810. end
  811.  
  812. if (toolAnim == "Slash") then
  813. playToolAnimation("toolslash", 0, Humanoid, Enum.AnimationPriority.Action)
  814. return
  815. end
  816.  
  817. if (toolAnim == "Lunge") then
  818. playToolAnimation("toollunge", 0, Humanoid, Enum.AnimationPriority.Action)
  819. return
  820. end
  821. end
  822.  
  823. function moveSit()
  824. RightShoulder.MaxVelocity = 0.15
  825. LeftShoulder.MaxVelocity = 0.15
  826. RightShoulder:SetDesiredAngle(3.14 /2)
  827. LeftShoulder:SetDesiredAngle(-3.14 /2)
  828. RightHip:SetDesiredAngle(3.14 /2)
  829. LeftHip:SetDesiredAngle(-3.14 /2)
  830. end
  831.  
  832. local lastTick = 0
  833.  
  834. function move(time)
  835. local amplitude = 1
  836. local frequency = 1
  837. local deltaTime = time - lastTick
  838. lastTick = time
  839.  
  840. local climbFudge = 0
  841. local setAngles = false
  842.  
  843. if (jumpAnimTime > 0) then
  844. jumpAnimTime = jumpAnimTime - deltaTime
  845. end
  846.  
  847. if (pose == "FreeFall" and jumpAnimTime <= 0) then
  848. playAnimation("fall", fallTransitionTime, Humanoid)
  849. elseif (pose == "Seated") then
  850. playAnimation("sit", 0.5, Humanoid)
  851. return
  852. elseif (pose == "Running") then
  853. playAnimation("walk", 0.1, Humanoid)
  854. elseif (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then
  855. -- print("Wha " .. pose)
  856. stopAllAnimations()
  857. amplitude = 0.1
  858. frequency = 1
  859. setAngles = true
  860. end
  861.  
  862. if (setAngles) then
  863. local desiredAngle = amplitude * math.sin(time * frequency)
  864.  
  865. RightShoulder:SetDesiredAngle(desiredAngle + climbFudge)
  866. LeftShoulder:SetDesiredAngle(desiredAngle - climbFudge)
  867. RightHip:SetDesiredAngle(-desiredAngle)
  868. LeftHip:SetDesiredAngle(-desiredAngle)
  869. end
  870.  
  871. -- Tool Animation handling
  872. local tool = getTool()
  873. if tool and tool:FindFirstChild("Handle") then
  874.  
  875. local animStringValueObject = getToolAnim(tool)
  876.  
  877. if animStringValueObject then
  878. toolAnim = animStringValueObject.Value
  879. -- message recieved, delete StringValue
  880. animStringValueObject.Parent = nil
  881. toolAnimTime = time + .3
  882. end
  883.  
  884. if time > toolAnimTime then
  885. toolAnimTime = 0
  886. toolAnim = "None"
  887. end
  888.  
  889. animateTool()
  890. else
  891. stopToolAnimations()
  892. toolAnim = "None"
  893. toolAnimInstance = nil
  894. toolAnimTime = 0
  895. end
  896. end
  897.  
  898. -- connect events
  899. Humanoid.Died:connect(onDied)
  900. Humanoid.Running:connect(onRunning)
  901. Humanoid.Jumping:connect(onJumping)
  902. Humanoid.Climbing:connect(onClimbing)
  903. Humanoid.GettingUp:connect(onGettingUp)
  904. Humanoid.FreeFalling:connect(onFreeFall)
  905. Humanoid.FallingDown:connect(onFallingDown)
  906. Humanoid.Seated:connect(onSeated)
  907. Humanoid.PlatformStanding:connect(onPlatformStanding)
  908. Humanoid.Swimming:connect(onSwimming)
  909.  
  910. -- setup emote chat hook
  911. game:GetService("Players").LocalPlayer.Chatted:connect(function(msg)
  912. local emote = ""
  913. if msg == "/e dance" then
  914. emote = dances[math.random(1, #dances)]
  915. elseif (string.sub(msg, 1, 3) == "/e ") then
  916. emote = string.sub(msg, 4)
  917. elseif (string.sub(msg, 1, 7) == "/emote ") then
  918. emote = string.sub(msg, 8)
  919. end
  920.  
  921. if (pose == "Standing" and emoteNames[emote] ~= nil) then
  922. playAnimation(emote, 0.1, Humanoid)
  923. end
  924.  
  925. end)
  926.  
  927.  
  928. -- main program
  929.  
  930. -- initialize to idle
  931. playAnimation("idle", 0.1, Humanoid)
  932. pose = "Standing"
  933.  
  934. while Figure.Parent ~= nil do
  935. local _, time = wait(0.1)
  936. move(time)
  937. end
  938.  
  939.  
  940. ]],chr)
  941. StringValue1.Name = "idle"
  942. StringValue1.Parent = LocalScript0
  943. Animation2.Name = "Animation1"
  944. Animation2.Parent = StringValue1
  945. Animation2.AnimationId = "http://www.roblox.com/asset/?id=180435571"
  946. NumberValue3.Name = "Weight"
  947. NumberValue3.Parent = Animation2
  948. NumberValue3.Value = 9
  949. Animation4.Name = "Animation2"
  950. Animation4.Parent = StringValue1
  951. Animation4.AnimationId = "http://www.roblox.com/asset/?id=180435792"
  952. NumberValue5.Name = "Weight"
  953. NumberValue5.Parent = Animation4
  954. NumberValue5.Value = 1
  955. StringValue6.Name = "walk"
  956. StringValue6.Parent = LocalScript0
  957. Animation7.Name = "WalkAnim"
  958. Animation7.Parent = StringValue6
  959. Animation7.AnimationId = "http://www.roblox.com/asset/?id=180426354"
  960. StringValue8.Name = "run"
  961. StringValue8.Parent = LocalScript0
  962. Animation9.Name = "RunAnim"
  963. Animation9.Parent = StringValue8
  964. Animation9.AnimationId = "http://www.roblox.com/asset/?id=180426354"
  965. StringValue10.Name = "jump"
  966. StringValue10.Parent = LocalScript0
  967. Animation11.Name = "JumpAnim"
  968. Animation11.Parent = StringValue10
  969. Animation11.AnimationId = "http://www.roblox.com/asset/?id=125750702"
  970. StringValue12.Name = "climb"
  971. StringValue12.Parent = LocalScript0
  972. Animation13.Name = "ClimbAnim"
  973. Animation13.Parent = StringValue12
  974. Animation13.AnimationId = "http://www.roblox.com/asset/?id=180436334"
  975. StringValue14.Name = "toolnone"
  976. StringValue14.Parent = LocalScript0
  977. Animation15.Name = "ToolNoneAnim"
  978. Animation15.Parent = StringValue14
  979. Animation15.AnimationId = "http://www.roblox.com/asset/?id=182393478"
  980. StringValue16.Name = "fall"
  981. StringValue16.Parent = LocalScript0
  982. Animation17.Name = "FallAnim"
  983. Animation17.Parent = StringValue16
  984. Animation17.AnimationId = "http://www.roblox.com/asset/?id=180436148"
  985. StringValue18.Name = "sit"
  986. StringValue18.Parent = LocalScript0
  987. Animation19.Name = "SitAnim"
  988. Animation19.Parent = StringValue18
  989. Animation19.AnimationId = "http://www.roblox.com/asset/?id=178130996"
  990. NumberValue20.Name = "ScaleDampeningPercent"
  991. NumberValue20.Parent = LocalScript0
  992. NumberValue20.Value = 0.4000000059604645
  993. NS([[-- Gradually regenerates the Humanoid's Health over time.
  994. local REGEN_RATE = 1/100 -- Regenerate this fraction of MaxHealth per second.
  995. local REGEN_STEP = 1 -- Wait this long between each regeneration step.
  996.  
  997. --------------------------------------------------------------------------------
  998.  
  999. local Character = script.Parent
  1000. local Humanoid = Character:WaitForChild'Humanoid'
  1001.  
  1002. --------------------------------------------------------------------------------
  1003.  
  1004. while true do
  1005. while Humanoid.Health < Humanoid.MaxHealth do
  1006. local dt = wait(REGEN_STEP)
  1007. local dh = dt*REGEN_RATE*Humanoid.MaxHealth
  1008. Humanoid.Health = math.min(Humanoid.Health + dh, Humanoid.MaxHealth)
  1009. end
  1010. Humanoid.HealthChanged:Wait()
  1011. end]],chr)
  1012.  
  1013. NLS([[local cf = workspace.CurrentCamera.CFrame
  1014. workspace.CurrentCamera.CameraSubject = game:GetService('Players').LocalPlayer.Character:FindFirstChildOfClass('Humanoid')
  1015. game:GetService('RunService').RenderStepped:Wait()
  1016. workspace.CurrentCamera.CFrame = cf
  1017. script:Destroy()]],Playrrr:FindFirstChildOfClass("PlayerGui"))
  1018. end
  1019. SetScripts()
  1020.  
  1021. function chat(cf,text)
  1022. coroutine.wrap(function()
  1023. pcall(function()
  1024. local p = Instance.new('Part',chr)
  1025. p.CFrame = cf
  1026. p.Size = Vector3.new(0.05,0.05,0.05)
  1027. p.Transparency = 1
  1028. p.Anchored = true
  1029. p.CanCollide = false
  1030. local c = script.Chat:Clone()
  1031. c.Parent = p
  1032. c.Adornee = p
  1033. local t = c.TextLabel
  1034. for i = 1,string.len(text) do
  1035. if p == nil or not p:IsDescendantOf(chr) then
  1036. break
  1037. end
  1038. local snd = Instance.new('Sound',head)
  1039. snd.Volume = 1
  1040. snd.Pitch = 1
  1041. snd.Looped = false
  1042. snd.PlayOnRemove = true
  1043. snd.SoundId = "rbxassetid://2469886818"
  1044. snd:Play()
  1045. snd:Destroy()
  1046. t.Text = text:sub(1,i)
  1047. game:GetService('RunService').Heartbeat:wait()
  1048. game:GetService('RunService').Heartbeat:wait()
  1049. game:GetService('RunService').Heartbeat:wait()
  1050. end
  1051. local rot = math.random(-20,20)
  1052. game:GetService('TweenService'):Create(c,TweenInfo.new(10),{
  1053. StudsOffset = c.StudsOffset-Vector3.new(math.random(1,2),math.random(1,2),math.random(1,2))
  1054. }):Play()
  1055. game:GetService('TweenService'):Create(t,TweenInfo.new(10),{
  1056. TextTransparency = 1,
  1057. TextStrokeTransparency = 1,
  1058. Rotation = math.random(-20,20)
  1059. }):Play()
  1060. game:GetService('Debris'):AddItem(p,10)
  1061. end)
  1062. end)()
  1063. end
  1064.  
  1065. chat(root.CFrame*CFrame.new(10,5,0),"lets just get this over with.")
  1066.  
  1067. function Refit()
  1068. if chr ~= nil and chr:IsA'Model' then
  1069. chr:Destroy()
  1070. end
  1071. chr = rig:Clone()
  1072. chr:FindFirstChildOfClass('Humanoid').DisplayDistanceType="Subject"
  1073. chr:FindFirstChildOfClass('Humanoid').DisplayName = "sans."
  1074. chr.Parent = workspace
  1075. plr.Character = chr
  1076. head = chr["Head"]
  1077. torso = chr["Torso"]
  1078. larm = chr["Left Arm"]
  1079. lleg = chr["Left Leg"]
  1080. rarm = chr["Right Arm"]
  1081. rleg = chr["Right Leg"]
  1082. root = chr["HumanoidRootPart"]
  1083. RootJoint = root["RootJoint"]
  1084. att = head["Attachment"]
  1085. teleport((root.CFrame*CFrame.new(math.random(-20,20),0,math.random(-20,20))).Position)
  1086. chr.DescendantRemoving:Connect(DescRem)
  1087. SetScripts()
  1088. chat(root.CFrame*CFrame.new(10,5,0),lines[math.random(1,#lines)])
  1089. end
  1090.  
  1091. function Kill(model)
  1092. model:BreakJoints()
  1093. for i,v in pairs(model:GetDescendants()) do
  1094. if v:IsA'BasePart' then
  1095. local p = Instance.new('Part',workspace)
  1096. p.Size = v.Size
  1097. p.CFrame = v.CFrame
  1098. p.Color = Color3.new(1,1,1)
  1099. p.Transparency = 0
  1100. p.Material = Enum.Material.Neon
  1101. p.CanCollide = false
  1102. p.Anchored = true
  1103. v:Destroy()
  1104. p:ClearAllChildren()
  1105. p:BreakJoints()
  1106. game:GetService('TweenService'):Create(p,TweenInfo.new(1),{
  1107. Orientation = p.Orientation+Vector3.new(math.random(-360,360),math.random(-360,360),math.random(-360,360)),
  1108. Position = p.Position+Vector3.new(math.random(-20,20),math.random(-20,20),math.random(-20,20)),
  1109. Size = Vector3.new(0,0,0),
  1110. Transparency = 1
  1111. }):Play()
  1112. game:GetService('Debris'):AddItem(p,1)
  1113. end
  1114. end
  1115. model:Destroy()
  1116. end
  1117.  
  1118. function Beam(Hit,parent,color,size)
  1119. local mag=(parent.Position-Hit).magnitude
  1120. local Laser = Instance.new("Part",workspace)
  1121. Laser.Name = "Laser"
  1122. Laser.CanCollide = false
  1123. Laser.Color = color
  1124. Laser.Transparency = 0
  1125. Laser.Anchored = true
  1126. Laser.Material = "Neon"
  1127. Laser.Size = Vector3.new(0.05,0.05,0.05)
  1128. local msh = Instance.new('SpecialMesh',Laser)
  1129. msh.MeshType="Sphere"
  1130. msh.Scale = Vector3.new(1 * mag, size, size) * 20
  1131. Laser.CFrame = parent.CFrame * CFrame.new(0,0,(-mag)/2) * CFrame.fromEulerAnglesXYZ(0,math.rad(90),0)
  1132. local Fire = Instance.new("Sound",parent)
  1133. Fire.SoundId = "rbxassetid://340722848"
  1134. Fire.Volume = 5
  1135. Fire.Pitch = 1
  1136. Fire.PlayOnRemove = true
  1137. Fire:Play()
  1138. Fire:Destroy()
  1139. local hit = Instance.new('Part',Laser)
  1140. hit.Anchored = true
  1141. hit.CanCollide = false
  1142. hit.Size = Vector3.new(1 * mag, size, size)*1.5
  1143. hit.CFrame = Laser.CFrame
  1144. hit.Transparency = 1
  1145. hit.Touched:connect(function(hit)
  1146. if hit:IsDescendantOf(chr) then return end
  1147. if hit.Parent:FindFirstChildOfClass('Humanoid') and hit.Parent:IsA'Model' then
  1148. local s = Instance.new('Sound',hit.Parent:FindFirstChildOfClass('Part'))
  1149. s.SoundId = "rbxassetid://5416548293"
  1150. s.Volume = 3
  1151. s.Pitch = 1
  1152. s.PlayOnRemove = true
  1153. s:Play()
  1154. s:Destroy()
  1155. game:GetService('RunService').Heartbeat:wait()
  1156. Kill(hit.Parent)
  1157. end
  1158. end)
  1159. coroutine.wrap(function()
  1160. local tw = game:GetService('TweenService'):Create(Laser,TweenInfo.new(1,0,0),{
  1161. Transparency = 1
  1162. })
  1163. tw:Play()
  1164. tw.Completed:wait()
  1165. Laser:Destroy()
  1166. end)()
  1167. end
  1168.  
  1169. function Blaster(Hit)
  1170. local shot = false
  1171. local GasterB = Instance.new("Part",workspace)
  1172. GasterB.CFrame = root.CFrame
  1173. GasterB.CanCollide = false
  1174. GasterB.Anchored = true
  1175. GasterB.Material = "SmoothPlastic"
  1176. GasterB.Color = Color3.new(1,1,1)
  1177. GasterB.Size = Vector3.new(0.05,0.05,0.05)
  1178. local zxc = Instance.new("SpecialMesh",GasterB)
  1179. zxc.MeshType = "FileMesh"
  1180. zxc.Scale = Vector3.new(1.5,1.5,1.5)
  1181. zxc.MeshId = "rbxassetid://2649585735"
  1182. coroutine.wrap(function()
  1183. pcall(function()
  1184. repeat
  1185. GasterB.CFrame = CFrame.new(GasterB.Position,Hit)
  1186. game:GetService('RunService').Heartbeat:wait()
  1187. until shot == true
  1188. end)
  1189. end)()
  1190. local Charge = Instance.new("Sound",GasterB)
  1191. Charge.SoundId = "rbxassetid://482211201"
  1192. Charge.Volume = 1
  1193. Charge.PlayOnRemove = true
  1194. Charge:Play()
  1195. Charge:Destroy()
  1196. local tw = game:GetService('TweenService'):Create(GasterB,TweenInfo.new(.4),{
  1197. Position = root.Position+Vector3.new(math.random(-17,17),math.random(5,8),math.random(-17,17))
  1198. })
  1199. tw:Play()
  1200. tw.Completed:wait()
  1201. zxc.MeshId = "rbxassetid://2649605211"
  1202. Beam(Hit,GasterB,Color3.new(1,1,1),5)
  1203. shot = true
  1204. wait(1)
  1205. local tw = game:GetService('TweenService'):Create(GasterB,TweenInfo.new(1),{
  1206. Transparency = 1
  1207. })
  1208. tw:Play()
  1209. tw.Completed:wait()
  1210. GasterB:Destroy()
  1211. end
  1212.  
  1213. local hb = game:GetService('RunService').Heartbeat:Connect(function()
  1214. Check()
  1215. sin = sin + 1
  1216. end)
  1217.  
  1218. local chatted = plr.Chatted:Connect(function(m)
  1219. local msg = ""
  1220. if m:sub(1,3) == "/e " then
  1221. msg = m:sub(4)
  1222. else
  1223. msg = m:sub(1)
  1224. end
  1225. if msg == "->stop" or msg == "-&gt;stop" then
  1226. disc()
  1227. end
  1228. chat(root.CFrame*CFrame.new(10,5,0),msg)
  1229. end)
  1230.  
  1231. local plrrem = game:GetService('Players').PlayerRemoving:Connect(function(p)
  1232. if p == plr then
  1233. disc()
  1234. end
  1235. end)
  1236.  
  1237. function disc()
  1238. hb:Disconnect()
  1239. chatted:Disconnect()
  1240. plrrem:Disconnect()
  1241. chr:Destroy()
  1242. rem:Destroy()
  1243. pcall(function()
  1244. if plr:FindFirstChildOfClass('PlayerGui'):FindFirstChild('Mouse') ~= nil then
  1245. plr:FindFirstChildOfClass('PlayerGui'):FindFirstChild('Mouse'):Destroy()
  1246. end
  1247. plr:LoadCharacter()
  1248. end)
  1249. script:ClearAllChildren()
  1250. script.Disabled=true
  1251. script:Destroy()
  1252. end
Advertisement
Add Comment
Please, Sign In to add comment