Advertisement
RyanDaCoder

gay sans script i wrote

Dec 30th, 2017
613
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.97 KB | None | 0 0
  1. ---------------------------
  2. -- Sans Script --
  3. ---------------------------
  4. local sword = Instance.new("Tool")
  5. sword.Name = "Blue Sword"
  6. sword.Parent = game.Players.LocalPlayer.Backpack
  7.  
  8. local hand = Instance.new("Part")
  9. hand.CFrame = CFrame.new(-12, 0.4, -39.5)
  10. hand.Anchored = false
  11. hand.Size = Vector3.new(1, 0.8, 4)
  12. hand.Parent = sword
  13.  
  14. local sm = Instance.new("SpecialMesh")
  15. sm.MeshId = "rbxasset://fonts/sword.mesh"
  16. sm.TextureId = "rbxasset://textures/SwordTexture.png"
  17. sm.Parent = hand
  18.  
  19. local so = Instance.new("Sound")
  20. so.Name = "Sound"
  21. so.SoundId = "rbxasset://sounds/swordslash.wav"
  22. so.Parent = hand
  23.  
  24. local stw = Instance.new("Sound")
  25. stw.Name = "Sound"
  26. stw.SoundId = "rbxasset://sounds/swordlunge.wav"
  27. stw.Parent = hand
  28.  
  29. local sth = Instance.new("Sound")
  30. sth.Name = "Sound"
  31. sth.SoundId = "rbxasset://sounds/unsheath.wav"
  32. sth.Parent = hand
  33.  
  34. r = game:service("RunService")
  35.  
  36.  
  37. local damage = 5
  38.  
  39.  
  40. local slash_damage = 10
  41. local lunge_damage = 30
  42.  
  43. sword = sword.Handle
  44. Tool = sword
  45.  
  46.  
  47. local SlashSound = Instance.new("Sound")
  48. SlashSound.SoundId = "rbxasset://sounds\\swordslash.wav"
  49. SlashSound.Parent = sword
  50. SlashSound.Volume = .7
  51.  
  52. local LungeSound = Instance.new("Sound")
  53. LungeSound.SoundId = "rbxasset://sounds\\swordlunge.wav"
  54. LungeSound.Parent = sword
  55. LungeSound.Volume = .6
  56.  
  57. local UnsheathSound = Instance.new("Sound")
  58. UnsheathSound.SoundId = "rbxasset://sounds\\unsheath.wav"
  59. UnsheathSound.Parent = sword
  60. UnsheathSound.Volume = 1
  61.  
  62.  
  63. function blow(hit)
  64. if (hit.Parent == nil) then return end -- happens when bullet hits sword
  65.  
  66. local humanoid = hit.Parent:findFirstChild("Humanoid")
  67. local vCharacter = Tool.Parent
  68. local vPlayer = game.Players:playerFromCharacter(vCharacter)
  69. local hum = vCharacter:findFirstChild("Humanoid") -- non-nil if tool held by a character
  70. if humanoid~=nil and humanoid ~= hum and hum ~= nil then
  71. -- final check, make sure sword is in-hand
  72.  
  73. local right_arm = vCharacter:FindFirstChild("Right Arm")
  74. if (right_arm ~= nil) then
  75. local joint = right_arm:FindFirstChild("RightGrip")
  76. if (joint ~= nil and (joint.Part0 == sword or joint.Part1 == sword)) then
  77. tagHumanoid(humanoid, vPlayer)
  78. humanoid:TakeDamage(damage)
  79. wait(1)
  80. untagHumanoid(humanoid)
  81. end
  82. end
  83.  
  84.  
  85. end
  86. end
  87.  
  88.  
  89. function tagHumanoid(humanoid, player)
  90. local creator_tag = Instance.new("ObjectValue")
  91. creator_tag.Value = player
  92. creator_tag.Name = "creator"
  93. creator_tag.Parent = humanoid
  94. end
  95.  
  96. function untagHumanoid(humanoid)
  97. if humanoid ~= nil then
  98. local tag = humanoid:findFirstChild("creator")
  99. if tag ~= nil then
  100. tag.Parent = nil
  101. end
  102. end
  103. end
  104.  
  105.  
  106. function attack()
  107. damage = slash_damage
  108. SlashSound:play()
  109. local anim = Instance.new("StringValue")
  110. anim.Name = "toolanim"
  111. anim.Value = "Slash"
  112. anim.Parent = Tool
  113. end
  114.  
  115. function lunge()
  116. damage = lunge_damage
  117.  
  118. LungeSound:play()
  119.  
  120. local anim = Instance.new("StringValue")
  121. anim.Name = "toolanim"
  122. anim.Value = "Lunge"
  123. anim.Parent = Tool
  124.  
  125.  
  126. force = Instance.new("BodyVelocity")
  127. force.velocity = Vector3.new(0,10,0) --Tool.Parent.Torso.CFrame.lookVector * 80
  128. force.Parent = Tool.Parent.Torso
  129. wait(.25)
  130. swordOut()
  131. wait(.25)
  132. force.Parent = nil
  133. wait(.5)
  134. swordUp()
  135.  
  136. damage = slash_damage
  137. end
  138.  
  139. function swordUp()
  140. Tool.GripForward = Vector3.new(-1,0,0)
  141. Tool.GripRight = Vector3.new(0,1,0)
  142. Tool.GripUp = Vector3.new(0,0,1)
  143. end
  144.  
  145. function swordOut()
  146. Tool.GripForward = Vector3.new(0,0,1)
  147. Tool.GripRight = Vector3.new(0,-1,0)
  148. Tool.GripUp = Vector3.new(-1,0,0)
  149. end
  150.  
  151. function swordAcross()
  152. -- parry
  153. end
  154.  
  155.  
  156. Tool.Enabled = true
  157. local last_attack = 0
  158. function onActivated()
  159.  
  160. if not Tool.Enabled then
  161. return
  162. end
  163.  
  164. Tool.Enabled = false
  165.  
  166. local character = Tool.Parent;
  167. local humanoid = character.Humanoid
  168. if humanoid == nil then
  169. print("Humanoid not found")
  170. return
  171. end
  172.  
  173. t = r.Stepped:wait()
  174.  
  175. if (t - last_attack < .2) then
  176. lunge()
  177. else
  178. attack()
  179. end
  180.  
  181. last_attack = t
  182.  
  183. --wait(.5)
  184.  
  185. Tool.Enabled = true
  186. end
  187.  
  188.  
  189. function onEquipped()
  190. UnsheathSound:play()
  191. end
  192.  
  193.  
  194. script.Parent.Activated:connect(onActivated)
  195. script.Parent.Equipped:connect(onEquipped)
  196.  
  197.  
  198. connection = sword.Touched:connect(blow)
  199.  
  200. local decal = Instance.new("Decal")
  201. decal.Texture = "http://www.roblox.com/asset/?id=78168991"
  202. decal.Parent = hand
  203.  
  204. local tint = Instance.new("TouchInterest")
  205. tint.Parent = hand
  206.  
  207. local weld = Instance.new("ManualWeld")
  208. weld.Name = "Handle-to-Handle Strong Joint"
  209. weld.Part0 = hand
  210. weld.Archivable = true
  211.  
  212. local Tool = script.Parent;
  213.  
  214. enabled = true
  215. function onButton1Down(mouse)
  216. if not enabled then
  217. return
  218. end
  219.  
  220. enabled = false
  221. mouse.Icon = "rbxasset://textures\\GunWaitCursor.png"
  222.  
  223. wait(.5)
  224. mouse.Icon = "rbxasset://textures\\GunCursor.png"
  225. enabled = true
  226.  
  227. end
  228.  
  229. function onEquippedLocal(mouse)
  230.  
  231. if mouse == nil then
  232. print("Mouse not found")
  233. return
  234. end
  235.  
  236. mouse.Icon = "rbxasset://textures\\GunCursor.png"
  237. mouse.Button1Down:connect(function() onButton1Down(mouse) end)
  238. end
  239.  
  240.  
  241. Tool.Equipped:connect(onEquippedLocal)
  242.  
  243.  
  244. local d = game.Players.LocalPlayer.Character:GetChildren()
  245. for i=1, #d do
  246. if (d[i].className == "Accessory") then
  247. d[i]:remove()
  248. end
  249. end
  250.  
  251. local badtime = "http://www.roblox.com/asset/?id=416805592"
  252. local bedtime = game.Players.LocalPlayer.Character.Head.face
  253.  
  254. bedtime.Texture = badtime
  255. -- son get to bed
  256. -- son says mum u gonna have bad time
  257.  
  258. local head = game.Players.LocalPlayer.Character.Head
  259. local torso = game.Players.LocalPlayer.Character.Torso
  260. local leftarm = game.Players.LocalPlayer.Character['Left Arm']
  261. local rightarm = game.Players.LocalPlayer.Character['Right Arm']
  262. local leftleg = game.Players.LocalPlayer.Character['Left Leg']
  263. local rightleg = game.Players.LocalPlayer.Character['Right Leg']
  264.  
  265. head.BrickColor = BrickColor.new("Institutional white")
  266. torso.BrickColor = BrickColor.new("Institutional white")
  267. leftarm.BrickColor = BrickColor.new("Institutional white")
  268. rightarm.BrickColor = BrickColor.new("Institutional white")
  269. leftleg.BrickColor = BrickColor.new("Institutional white")
  270. rightleg.BrickColor = BrickColor.new("Institutional white")
  271.  
  272. local spd = "http://www.roblox.com/asset/?id=315964941"
  273. local ssd = "http://www.roblox.com/asset/?id=383810694"
  274.  
  275. local shirt = Instance.new("Shirt")
  276. local pants = Instance.new("Pants")
  277.  
  278. shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=383810694"
  279. pants.PantsTemplate = "http://www.roblox.com/asset/?id=315964941"
  280.  
  281. shirt.Parent = game.Players.LocalPlayer.Character
  282. pants.Parent = game.Players.LocalPlayer.Character
  283.  
  284. local fast = game.Players.LocalPlayer.Character.Humanoid
  285. fast.WalkSpeed = "32"
  286. fast.JumpPower = "123"
  287.  
  288. local me = game.Workspace[game.Players.LocalPlayer.Name]
  289.  
  290. me.Name = "*"
  291. wait(1)
  292. me.Name = "**"
  293. wait(1)
  294. me.Name = "** "
  295. wait(1)
  296. me.Name = "** S"
  297. wait(1)
  298. me.Name = "** Sc"
  299. wait(1)
  300. me.Name = "** Scr"
  301. wait(1)
  302. me.Name = "** Scri"
  303. wait(1)
  304. me.Name = "** Scrip"
  305. wait(1)
  306. me.Name = "** Script"
  307. wait(1)
  308. me.Name = "** Script "
  309. wait(1)
  310. me.Name = "** Script C"
  311. wait(1)
  312. me.Name = "** Script Cr"
  313. wait(1)
  314. me.Name = "** Script Cre"
  315. wait(1)
  316. me.Name = "** Script Crea"
  317. wait(1)
  318. me.Name = "** Script Creat"
  319. wait(1)
  320. me.Name = "** Script Create"
  321. wait(1)
  322. me.Name = "** Script Create"
  323. wait(1)
  324. me.Name = "** Script Created"
  325. wait(1)
  326. me.Name = "** Script Created "
  327. wait(1)
  328. me.Name = "** Script Created B"
  329. wait(1)
  330. me.Name = "** Script Created By"
  331. wait(1)
  332. me.Name = "** Script Created By "
  333. wait(1)
  334. me.Name = "** Script Created By P"
  335. wait(1)
  336. me.Name = "** Script Created By PE"
  337. wait(1)
  338. me.Name = "** Script Created By PEN"
  339. wait(1)
  340. me.Name = "** Script Created By PENb"
  341. wait(1)
  342. me.Name = "** Script Created By PENbI"
  343. wait(1)
  344. me.Name = "** Script Created By PENbIS"
  345. wait(1)
  346. me.Name = "** Script Created By PENbIS_"
  347. wait(1)
  348. me.Name = "** Script Created By PENbIS_1"
  349. wait(1)
  350. me.Name = "** Script Created By PENbIS_1 "
  351. wait(1)
  352. me.Name = "** Script Created By PENbIS_1 *"
  353. wait(1)
  354. me.Name = "** Script Created By PENbIS_1 **"
  355. --kthxbye
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement